#ifndef _INCLUDES_H
#define _INCLUDES_H
/*
- Unix SMB/Netbios implementation.
- Version 1.9.
+ Unix SMB/CIFS implementation.
Machine customisation and include handling
Copyright (C) Andrew Tridgell 1994-1998
+ Copyright (C) 2002 by Martin Pool <mbp@samba.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#endif
#endif
-/* use gcc attribute to check printf fns */
#ifdef __GNUC__
+/** Use gcc attribute to check printf fns. a1 is the 1-based index of
+ * the parameter containing the format, and a2 the index of the first
+ * argument. **/
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
#else
#define PRINTF_ATTRIBUTE(a1, a2)
#endif
+#ifdef __GNUC__
+/** gcc attribute used on function parameters so that it does not emit
+ * warnings about them being unused. **/
+# define UNUSED(param) param __attribute__ ((unused))
+#else
+# define UNUSED(param) param
+/** Feel free to add definitions for other compilers here. */
+#endif
+
#ifdef RELIANTUNIX
/*
* <unistd.h> has to be included before any other to get
#undef HAVE_KRB5
#endif
+#if HAVE_LBER_H
+#include <lber.h>
+#endif
+
#if HAVE_LDAP_H
#include <ldap.h>
#else
#if HAVE_GSSAPI_GSSAPI_H
#include <gssapi/gssapi.h>
+#else
+#undef HAVE_KRB5
+#endif
+
+#if HAVE_GSSAPI_GSSAPI_GENERIC_H
#include <gssapi/gssapi_generic.h>
#else
#undef HAVE_KRB5
#endif
/* we support ADS if we have krb5 and ldap libs */
-#if defined(HAVE_KRB5) && defined(HAVE_LDAP)
+#if defined(HAVE_KRB5) && defined(HAVE_LDAP) && defined(HAVE_GSSAPI)
#define HAVE_ADS
#endif
*/
#ifndef SMB_DEV_T
-#define SMB_DEV_T dev_t
+# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_DEV64_T)
+# define SMB_DEV_T dev64_t
+# else
+# define SMB_DEV_T dev_t
+# endif
#endif
/*
#include "auth.h"
+#include "passdb.h"
+
#include "session.h"
-#include "asn1.h"
+#include "asn_1.h"
#include "popt.h"
#include <dlfcn.h>
#endif
+/* dmalloc -- free heap debugger (dmalloc.org). This should be near
+ * the *bottom* of include files so as not to conflict. */
+#ifdef ENABLE_DMALLOC
+# include <dmalloc.h>
+#endif
+
+
/* Some POSIX definitions for those without */
#ifndef S_IFDIR