===================================
License:
-For the most part, Bacula is licensed under the GPL version 2 this
+For the most part, Bacula is licensed under the GPL version 2. This
code is listed under Copyright Free Software Foundation Europe e.V.
What follows is the addition(s) to the GPL version 2 license, that
applies to code that is copyrighted by the Free Software Foundation
declares uintmax_t. */
#undef HAVE_INTTYPES_H_WITH_UINTMAX
+/* Set if ioctl request is unsigned long int */
+#undef HAVE_IOCTL_ULINT_REQUEST
+
/* Whether to enable IPv6 support */
#undef HAVE_IPV6
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
+/* Set if socklen_t exists */
+#undef HAVE_SOCKLEN_T
+
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
)
]
)
-test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T)
+test $ba_cv_header_socklen_t = yes && AC_DEFINE(HAVE_SOCKLEN_T, 1, [Set if socklen_t exists])
+
+dnl --------------------------------------------------------------------------
+dnl Check for ioctl request type
+dnl --------------------------------------------------------------------------
+AC_CACHE_CHECK(for ioctl_req_t, ba_cv_header_ioctl_req_t,
+ [
+ AC_TRY_COMPILE(
+ [
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ ], [
+ unsigned long int req;
+ int fd;
+ ioctl(fd, req);
+ ], [
+ ba_cv_header_ioctl_req_t=yes
+ ], [
+ ba_cv_header_ioct_req_t_t=no
+ ]
+ )
+ ]
+)
+test $ba_cv_header_ioctl_req_t = yes && AC_DEFINE(HAVE_IOCTL_ULINT_REQUEST, 1, [Set if ioctl request is unsigned long int])
+
dnl --------------------------------------------------------------------------
dnl Check for typeof()
#define ETIME ETIMEDOUT
#endif
-#define ioctl_req_t long unsigned int
+#ifdef HAVE_IOCTL_ULINT_REQUEST
+#define ioctl_req_t unsigned long int
+#else
+#define ioctl_req_t int
+#endif
#ifdef PROTOTYPES
# define __PROTO(p) p
/* take this 'shortcut' */
#define fseeko fseek
#define ftello ftell
-#undef ioctl_req_t
-#define ioctl_req_t int
#endif
-#ifdef HAVE_OSF1_OS
-#undef ioctl_req_t
-#define ioctl_req_t int
-#endif
-
#ifdef HAVE_SUN_OS
/*
* On Solaris 2.5, threads are not timesliced by default, so we need to
#define set_thread_concurrency(x) thr_setconcurrency(x)
extern int thr_setconcurrency(int);
#define SunOS 1
-#undef ioctl_req_t
-#define ioctl_req_t int
#else
*/
extern "C" int getdomainname(char *name, int namelen);
extern "C" int setdomainname(char *name, int namelen);
-#undef ioctl_req_t
-#define ioctl_req_t int
#endif /* HAVE_HPUX_OS */
#ifdef HAVE_OSF1_OS
extern "C" int fchdir(int filedes);
extern "C" long gethostid(void);
-extern "C" int mknod ( const char *path, int mode, dev_t device );
-#undef ioctl_req_t
-#define ioctl_req_t int
+extern "C" int mknod(const char *path, int mode, dev_t device );
#endif
if (current_xattr->value_length > 0)
free(current_xattr->value);
+
+ free(current_xattr);
}
delete xattr_value_list;
unsigned int namespace_index;
int attrnamespace;
char *current_attrnamespace = NULL;
- char current_attrname[BUFSIZ], current_attrtuple[BUFSIZ];
+ char current_attrname[XATTR_BUFSIZ], current_attrtuple[XATTR_BUFSIZ];
xattr_t *current_xattr;
alist *xattr_value_list = NULL;
bxattr_exit_code retval = bxattr_exit_error;
char link_source[PATH_MAX];
char *acl_text = NULL;
char attribs[MAXSTRING];
- char buffer[BUFSIZ];
+ char buffer[XATTR_BUFSIZ];
bxattr_exit_code retval = bxattr_exit_error;
berrno be;
*/
#define MAX_XATTR_STREAM (1 * 1024 * 1024) /* 1 Mb */
+/*
+ * Upperlimit on a xattr internal buffer
+ */
+#define XATTR_BUFSIZ 1024
+
#endif