From 09adc944c379bb9f683d883a14fd8f5b642a40e4 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Sat, 20 Feb 2010 07:48:04 -0800 Subject: autoconf: make sure C files include config.h Signed-off-by: Jeff Layton --- Makefile.in | 2 +- cifs.upcall.c | 4 ++++ config.h.in | 30 +++++++++--------------------- configure.ac | 1 + mount.cifs.c | 6 +++--- 5 files changed, 18 insertions(+), 25 deletions(-) diff --git a/Makefile.in b/Makefile.in index 0aecdf3..97f5e9c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -196,7 +196,7 @@ AM_CFLAGS = -Wall root_sbindir = "/sbin" mount_cifs_SOURCES = mount.cifs.c mtab.c util.c cifs_upcall_SOURCES = cifs.upcall.c data_blob.c asn1.c spnego.c util.c -cifs_upcall_LDADD = -ltalloc -lkrb5 +cifs_upcall_LDADD = -ltalloc -lkrb5 -lkeyutils man_MANS = cifs.upcall.8 mount.cifs.8 all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am diff --git a/cifs.upcall.c b/cifs.upcall.c index f8275e6..595b68a 100644 --- a/cifs.upcall.c +++ b/cifs.upcall.c @@ -25,6 +25,10 @@ create dns_resolver * * /usr/local/sbin/cifs.upcall %k * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ + #include #include #include diff --git a/config.h.in b/config.h.in index d5fa37e..d3370a8 100644 --- a/config.h.in +++ b/config.h.in @@ -71,6 +71,9 @@ /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV +/* Define to 1 if the system has the type `ssize_t'. */ +#undef HAVE_SSIZE_T + /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H @@ -143,6 +146,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_TALLOC_H +/* Define to 1 if the system has the type `uint32_t'. */ +#undef HAVE_UINT32_T + +/* Define to 1 if the system has the type `uint8_t'. */ +#undef HAVE_UINT8_T + /* Define to 1 if you have the `uname' function. */ #undef HAVE_UNAME @@ -212,16 +221,6 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE -/* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -#undef _UINT32_T - -/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -#undef _UINT8_T - /* Define to `int' if doesn't define. */ #undef gid_t @@ -240,16 +239,5 @@ /* Define to `unsigned int' if does not define. */ #undef size_t -/* Define to `int' if does not define. */ -#undef ssize_t - /* Define to `int' if doesn't define. */ #undef uid_t - -/* Define to the type of an unsigned integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -#undef uint32_t - -/* Define to the type of an unsigned integer type of width exactly 8 bits if - such a type exists and the standard includes do not define it. */ -#undef uint8_t diff --git a/configure.ac b/configure.ac index cbbef7c..a34b136 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,7 @@ AM_INIT_AUTOMAKE([cifs-utils], [4.0]) # Checks for programs. AC_PROG_CC +AC_GNU_SOURCE # Checks for libraries. diff --git a/mount.cifs.c b/mount.cifs.c index a9d827c..5237476 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -16,9 +16,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif /* HAVE_CONFIG_H */ #include #include -- cgit v1.2.3