summaryrefslogtreecommitdiff
path: root/source4/lib/util
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-02 04:53:27 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-02 04:53:27 +0200
commitafe3e8172ddaa5e4aa811faceecda4f943d6e2ef (patch)
treeb331a7d54d7d500517d5abfc0ee60484e7430a40 /source4/lib/util
parent7b608fd288dca3aa2237dbe73a5e14d0bcd0d42b (diff)
downloadsamba-afe3e8172ddaa5e4aa811faceecda4f943d6e2ef.tar.gz
samba-afe3e8172ddaa5e4aa811faceecda4f943d6e2ef.tar.bz2
samba-afe3e8172ddaa5e4aa811faceecda4f943d6e2ef.zip
Install public header files again and include required prototypes.
(This used to be commit 47ffbbf67435904754469544390b67d34c958343)
Diffstat (limited to 'source4/lib/util')
-rw-r--r--source4/lib/util/config.mk3
-rw-r--r--source4/lib/util/dprintf.c6
-rw-r--r--source4/lib/util/util_file.c4
-rw-r--r--source4/lib/util/util_ldb.c4
-rw-r--r--source4/lib/util/util_ldb.h26
-rw-r--r--source4/lib/util/wrap_xattr.h12
6 files changed, 46 insertions, 9 deletions
diff --git a/source4/lib/util/config.mk b/source4/lib/util/config.mk
index c6afad1e3f..483e835e00 100644
--- a/source4/lib/util/config.mk
+++ b/source4/lib/util/config.mk
@@ -33,6 +33,7 @@ PUBLIC_HEADERS += $(addprefix lib/util/, util.h \
mutex.h \
safe_string.h \
time.h \
+ util_ldb.h \
xfile.h)
[SUBSYSTEM::ASN1_UTIL]
@@ -48,7 +49,6 @@ OBJ_FILES = unix_privs.o
################################################
# Start SUBSYSTEM WRAP_XATTR
[SUBSYSTEM::WRAP_XATTR]
-PRIVATE_PROTO_HEADER = wrap_xattr.h
OBJ_FILES = \
wrap_xattr.o
PUBLIC_DEPENDENCIES = XATTR
@@ -63,7 +63,6 @@ OBJ_FILES = \
PUBLIC_DEPENDENCIES = LIBTDB
[SUBSYSTEM::UTIL_LDB]
-PRIVATE_PROTO_HEADER = util_ldb.h
OBJ_FILES = \
util_ldb.o
PUBLIC_DEPENDENCIES = LIBLDB
diff --git a/source4/lib/util/dprintf.c b/source4/lib/util/dprintf.c
index 308d81b105..e4f02758eb 100644
--- a/source4/lib/util/dprintf.c
+++ b/source4/lib/util/dprintf.c
@@ -42,7 +42,7 @@ void d_set_iconv(smb_iconv_t cd)
display_cd = cd;
}
-_PUBLIC_ int d_vfprintf(FILE *f, const char *format, va_list ap) _PRINTF_ATTRIBUTE(2,0)
+_PUBLIC_ int d_vfprintf(FILE *f, const char *format, va_list ap)
{
char *p, *p2;
int ret, clen;
@@ -85,7 +85,7 @@ _PUBLIC_ int d_vfprintf(FILE *f, const char *format, va_list ap) _PRINTF_ATTRIBU
}
-_PUBLIC_ int d_fprintf(FILE *f, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
+_PUBLIC_ int d_fprintf(FILE *f, const char *format, ...)
{
int ret;
va_list ap;
@@ -97,7 +97,7 @@ _PUBLIC_ int d_fprintf(FILE *f, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
return ret;
}
-_PUBLIC_ int d_printf(const char *format, ...) _PRINTF_ATTRIBUTE(1,2)
+_PUBLIC_ int d_printf(const char *format, ...)
{
int ret;
va_list ap;
diff --git a/source4/lib/util/util_file.c b/source4/lib/util/util_file.c
index 836e188ac1..c3e22196c0 100644
--- a/source4/lib/util/util_file.c
+++ b/source4/lib/util/util_file.c
@@ -356,7 +356,7 @@ _PUBLIC_ bool file_save(const char *fname, const void *packet, size_t length)
return true;
}
-_PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) _PRINTF_ATTRIBUTE(2,0)
+_PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap)
{
char *p;
int len, ret;
@@ -371,7 +371,7 @@ _PUBLIC_ int vfdprintf(int fd, const char *format, va_list ap) _PRINTF_ATTRIBUTE
return ret;
}
-_PUBLIC_ int fdprintf(int fd, const char *format, ...) _PRINTF_ATTRIBUTE(2,3)
+_PUBLIC_ int fdprintf(int fd, const char *format, ...)
{
va_list ap;
int ret;
diff --git a/source4/lib/util/util_ldb.c b/source4/lib/util/util_ldb.c
index f1b42effd8..38f53c2c66 100644
--- a/source4/lib/util/util_ldb.c
+++ b/source4/lib/util/util_ldb.c
@@ -33,7 +33,7 @@ int gendb_search_v(struct ldb_context *ldb,
struct ldb_message ***msgs,
const char * const *attrs,
const char *format,
- va_list ap) _PRINTF_ATTRIBUTE(6,0)
+ va_list ap)
{
enum ldb_scope scope = LDB_SCOPE_SUBTREE;
struct ldb_result *res;
@@ -85,7 +85,7 @@ int gendb_search(struct ldb_context *ldb,
struct ldb_dn *basedn,
struct ldb_message ***res,
const char * const *attrs,
- const char *format, ...) _PRINTF_ATTRIBUTE(6,7)
+ const char *format, ...)
{
va_list ap;
int count;
diff --git a/source4/lib/util/util_ldb.h b/source4/lib/util/util_ldb.h
new file mode 100644
index 0000000000..864ce7e8c6
--- /dev/null
+++ b/source4/lib/util/util_ldb.h
@@ -0,0 +1,26 @@
+#ifndef __LIB_UTIL_UTIL_LDB_H__
+#define __LIB_UTIL_UTIL_LDB_H__
+
+int gendb_search_v(struct ldb_context *ldb,
+ TALLOC_CTX *mem_ctx,
+ struct ldb_dn *basedn,
+ struct ldb_message ***msgs,
+ const char * const *attrs,
+ const char *format,
+ va_list ap) _PRINTF_ATTRIBUTE(6,0);
+int gendb_search(struct ldb_context *ldb,
+ TALLOC_CTX *mem_ctx,
+ struct ldb_dn *basedn,
+ struct ldb_message ***res,
+ const char * const *attrs,
+ const char *format, ...) _PRINTF_ATTRIBUTE(6,7);
+int gendb_search_dn(struct ldb_context *ldb,
+ TALLOC_CTX *mem_ctx,
+ struct ldb_dn *dn,
+ struct ldb_message ***res,
+ const char * const *attrs);
+int gendb_add_ldif(struct ldb_context *ldb, const char *ldif_string);
+char *wrap_casefold(void *context, void *mem_ctx, const char *s);
+
+#endif /* __LIB_UTIL_UTIL_LDB_H__ */
+
diff --git a/source4/lib/util/wrap_xattr.h b/source4/lib/util/wrap_xattr.h
new file mode 100644
index 0000000000..64b28d250c
--- /dev/null
+++ b/source4/lib/util/wrap_xattr.h
@@ -0,0 +1,12 @@
+#ifndef __LIB_UTIL_WRAP_XATTR_H__
+#define __LIB_UTIL_WRAP_XATTR_H__
+
+ssize_t wrap_fgetxattr(int fd, const char *name, void *value, size_t size);
+ssize_t wrap_getxattr(const char *path, const char *name, void *value, size_t size);
+int wrap_fsetxattr(int fd, const char *name, void *value, size_t size, int flags);
+int wrap_setxattr(const char *path, const char *name, void *value, size_t size, int flags);
+int wrap_fremovexattr(int fd, const char *name);
+int wrap_removexattr(const char *path, const char *name);
+
+#endif /* __LIB_UTIL_WRAP_XATTR_H__ */
+