AC_SUBST(SONAMEFLAG)
AC_SUBST(PICFLAG)
-AC_DEFINE([_GNU_SOURCE],[],[Pull in GNU extensions])
AC_SYS_LARGEFILE
#
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(sys/select.h fcntl.h sys/fcntl.h sys/time.h stdarg.h)
-AC_CHECK_HEADERS(utime.h grp.h sys/id.h limits.h memory.h compat.h math.h)
+AC_CHECK_HEADERS(utime.h grp.h sys/id.h limits.h compat.h math.h)
AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h)
AC_CHECK_HEADERS(sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
AC_CHECK_LIB_EXT(crypt, CRYPT_LIBS, crypt)
SMB_EXT_LIB_ENABLE(CRYPT,YES)
SMB_EXT_LIB(CRYPT, $CRYPT_LIBS)
-
-##
-## moved after the check for -lcrypt in order to
-## ensure that the necessary libraries are included
-## check checking for truncated salt. Wrapped by the
-## $with_pam_for_crypt variable as above --jerry
-##
-if test x"$with_pam_for_crypt" != x"yes"; then
-AC_CACHE_CHECK([for a crypt that needs truncated salt],samba_cv_HAVE_TRUNCATED_SALT,[
-crypt_LIBS="$LIBS"
-LIBS="$AUTHLIBS $LIBS"
-AC_TRY_RUN([#include "${srcdir-.}/build/tests/crypttest.c"],
- samba_cv_HAVE_TRUNCATED_SALT=no,samba_cv_HAVE_TRUNCATED_SALT=yes,samba_cv_HAVE_TRUNCATED_SALT=cross)
-LIBS="$crypt_LIBS"])
-if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
- AC_DEFINE(HAVE_TRUNCATED_SALT,1,[Whether crypt needs truncated salt])
-fi
-fi
sinclude(lib/ldb/config.m4)
sinclude(lib/tls/config.m4)
sinclude(lib/events/config.m4)
-sinclude(lib/cmdline/config.m4)
dnl disabled until we support external heimdal again
dnl sinclude(auth/kerberos/config.m4)
#endif
#endif
+#define _GNU_SOURCE /* Use GNU extensions */
+
/* mark smb_panic() as noreturn, so static analysers know that it is
used like abort */
_PUBLIC_ void smb_panic(const char *why) NORETURN_ATTRIBUTE;
dest = *destp;
sepLen = (delim) ? strlen(delim) : 0;
-#ifdef HAVE_VA_COPY
va_copy(ap, args);
-#elif HAVE___VA_COPY
- __va_copy(ap, args);
-#else
- ap = args;
-#endif
addBytes = 0;
str = src;
while (str) {
}
if (addBytes > 0) {
-#ifdef HAVE_VA_COPY
va_copy(ap, args);
-#elif HAVE___VA_COPY
- __va_copy(ap, args);
-#else
- ap = args;
-#endif
str = src;
while (str) {
strcpy(dp, str);
#define slprintf snprintf
-#ifdef HAVE_VA_COPY
-#define VA_COPY(dest, src) va_copy(dest, src)
-#elif defined(HAVE___VA_COPY)
-#define VA_COPY(dest, src) __va_copy(dest, src)
+#ifndef HAVE_VA_COPY
+#ifdef HAVE___VA_COPY
+#define va_copy(dest, src) __va_copy(dest, src)
#else
-#define VA_COPY(dest, src) (dest) = (src)
+#define va_copy(dest, src) (dest) = (src)
+#endif
#endif
-#if defined(HAVE_VOLATILE)
-#define VOLATILE volatile
-#else
-#define VOLATILE
+#ifndef HAVE_VOLATILE
+#define volatile
#endif
#ifndef HAVE_COMPARISON_FN_T
return ret;
}
-#ifndef VA_COPY
-#ifdef HAVE_VA_COPY
-#define VA_COPY(dest, src) va_copy(dest, src)
-#elif defined(HAVE___VA_COPY)
-#define VA_COPY(dest, src) __va_copy(dest, src)
+#ifndef HAVE_VA_COPY
+#ifdef HAVE___VA_COPY
+#define va_copy(dest, src) __va_copy(dest, src)
#else
-#define VA_COPY(dest, src) (dest) = (src)
+#define va_copy(dest, src) (dest) = (src)
#endif
#endif
va_list ap2;
char c;
- VA_COPY(ap2, ap);
+ va_copy(ap2, ap);
/* this call looks strange, but it makes it work on older solaris boxes */
if ((len = vsnprintf(&c, 1, fmt, ap2)) < 0) {
ret = _talloc(t, len+1);
if (ret) {
- VA_COPY(ap2, ap);
+ va_copy(ap2, ap);
vsnprintf(ret, len+1, fmt, ap2);
talloc_set_name_const(ret, ret);
}
tc = talloc_chunk_from_ptr(s);
- VA_COPY(ap2, ap);
+ va_copy(ap2, ap);
s_len = tc->size - 1;
if ((len = vsnprintf(NULL, 0, fmt, ap2)) <= 0) {
s = talloc_realloc(NULL, s, char, s_len + len+1);
if (!s) return NULL;
- VA_COPY(ap2, ap);
+ va_copy(ap2, ap);
vsnprintf(s+s_len, len+1, fmt, ap2);
talloc_set_name_const(s, s);
va_list ap2;
/* do any message translations */
- VA_COPY(ap2, ap);
+ va_copy(ap2, ap);
ret = vasprintf(&p, format, ap2);
static pid_t initialised;
static int select_pipe[2];
-static VOLATILE unsigned pipe_written, pipe_read;
+static volatile unsigned pipe_written, pipe_read;
/*******************************************************************
Call this from all Samba signal handlers if you want to avoid a
int len, ret;
va_list ap2;
- VA_COPY(ap2, ap);
+ va_copy(ap2, ap);
len = vasprintf(&p, format, ap2);
if (len <= 0) return len;
int len, ret;
va_list ap2;
- VA_COPY(ap2, ap);
+ va_copy(ap2, ap);
len = vasprintf(&p, format, ap2);
if (len <= 0) return len;