r6828: More portability fixes
authorJelmer Vernooij <jelmer@samba.org>
Mon, 16 May 2005 21:08:44 +0000 (21:08 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:16:48 +0000 (13:16 -0500)
source/build/smb_build/makefile.pm
source/lib/talloc/Makefile.in
source/lib/talloc/configure.in
source/lib/talloc/talloc.c

index f9221879bfab109b67a26f41e4ef91d34568e7d0..1eb1c6ea008b1ef4f046699a7b5e60a81ff6b537 100644 (file)
@@ -85,7 +85,7 @@ sub _prepare_compiler_linker($)
 
        $output = << '__EOD__';
 CC=@CC@
-CC_FLAGS=-Iinclude -I. -I$(srcdir)/include -I$(srcdir) -D_SAMBA_BUILD_ -Ilib @CFLAGS@ @CPPFLAGS@
+CC_FLAGS=-Iinclude -I. -I$(srcdir)/include -I$(srcdir) -D_SAMBA_BUILD_ -DHAVE_CONFIG_H -Ilib @CFLAGS@ @CPPFLAGS@
 
 LD=@CC@
 LD_FLAGS=@LDFLAGS@ @CFLAGS@
index 6efa9e19209203a3d4ee94abcc64db14aca617bb..f11124e707b199fff21d8638ee8c8421c12f5f3b 100644 (file)
@@ -6,7 +6,7 @@ mandir = @mandir@
 XSLTPROC = @XSLTPROC@
 INSTALLCMD = @INSTALL@
 CC = @CC@
-CFLAGS=@CFLAGS@
+CFLAGS = @CFLAGS@ -DHAVE_CONFIG_H=
 
 LIBOBJ = talloc.o
 
index 8e7e8252fd58013b2b1c42fb3e5e16c27ffa2fcf..d4afacc7a7ccbb5d1b4848ab6889373e874fb4c4 100644 (file)
@@ -6,7 +6,7 @@ if test "x$GCC" = "xyes"; then
 fi
 AC_PROG_INSTALL
 AC_PATH_PROG(XSLTPROC,xsltproc)
-AC_CHECK_HEADERS(stdint.h stdarg.h)
+AC_CHECK_HEADERS(stdint.h stdarg.h unistd.h sys/types.h)
 AC_CONFIG_HEADER(config.h)
 sinclude(config.m4)
 AC_OUTPUT(Makefile talloc.pc)
index d3fa961c74055606d0d511b06e1cc8ed3cf93309..8a29c8c014440952c960efc00c798985fc95cdb1 100644 (file)
 */
 
 
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 #ifdef HAVE_STDARG_H
 #include <stdarg.h>