svn commit: samba r14844 - in branches/SAMBA_4_0/source: build/m4
client include lib/appweb/mpr lib/replace param
jelmer at samba.org
jelmer at samba.org
Fri Mar 31 23:28:19 GMT 2006
Author: jelmer
Date: 2006-03-31 23:28:18 +0000 (Fri, 31 Mar 2006)
New Revision: 14844
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14844
Log:
Support a stdbool.h replacement in lib/replace/
Modified:
branches/SAMBA_4_0/source/build/m4/check_types.m4
branches/SAMBA_4_0/source/build/m4/rewrite.m4
branches/SAMBA_4_0/source/client/cifsdd.c
branches/SAMBA_4_0/source/include/core.h
branches/SAMBA_4_0/source/include/includes.h
branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.h
branches/SAMBA_4_0/source/lib/replace/README
branches/SAMBA_4_0/source/lib/replace/config.m4
branches/SAMBA_4_0/source/lib/replace/replace.h
branches/SAMBA_4_0/source/param/param.h
Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/check_types.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/check_types.m4 2006-03-31 13:41:49 UTC (rev 14843)
+++ branches/SAMBA_4_0/source/build/m4/check_types.m4 2006-03-31 23:28:18 UTC (rev 14844)
@@ -15,8 +15,6 @@
AC_HEADER_STDC
-AC_CHECK_HEADERS(stdbool.h)
-
AC_CHECK_SIZEOF(short,cross)
AC_CHECK_SIZEOF(int,cross)
AC_CHECK_SIZEOF(long,cross)
@@ -27,5 +25,3 @@
if test $ac_cv_sizeof_long_long -lt 8;then
AC_MSG_ERROR([Sorry we need sizeof(long long) >= 8])
fi
-AC_CHECK_TYPE(_Bool)
-
Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4
===================================================================
--- branches/SAMBA_4_0/source/build/m4/rewrite.m4 2006-03-31 13:41:49 UTC (rev 14843)
+++ branches/SAMBA_4_0/source/build/m4/rewrite.m4 2006-03-31 23:28:18 UTC (rev 14844)
@@ -58,7 +58,7 @@
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_HEADERS(fnmatch.h pwd.h sys/termio.h sys/time.h sys/statfs.h sys/statvfs.h stdarg.h)
-AC_CHECK_HEADERS(stdint.h inttypes.h locale.h shadow.h)
+AC_CHECK_HEADERS(locale.h shadow.h)
AC_CHECK_HEADERS(nss.h nss_common.h ns_api.h sys/security.h)
AC_CHECK_HEADERS(sys/capability.h sys/acl.h)
Modified: branches/SAMBA_4_0/source/client/cifsdd.c
===================================================================
--- branches/SAMBA_4_0/source/client/cifsdd.c 2006-03-31 13:41:49 UTC (rev 14843)
+++ branches/SAMBA_4_0/source/client/cifsdd.c 2006-03-31 23:28:18 UTC (rev 14844)
@@ -195,7 +195,7 @@
arg->arg_val.nval = va_arg(ap, uint64_t);
break;
case ARG_BOOL:
- arg->arg_val.bval = va_arg(ap, BOOL);
+ arg->arg_val.bval = va_arg(ap, int);
break;
case ARG_PATHNAME:
arg->arg_val.pval = va_arg(ap, char *);
Modified: branches/SAMBA_4_0/source/include/core.h
===================================================================
--- branches/SAMBA_4_0/source/include/core.h 2006-03-31 13:41:49 UTC (rev 14843)
+++ branches/SAMBA_4_0/source/include/core.h 2006-03-31 23:28:18 UTC (rev 14844)
@@ -26,12 +26,11 @@
#include "libcli/util/nt_status.h"
+typedef int BOOL;
+
#define False (0)
#define True (1)
-#define Auto (2)
-typedef int BOOL;
-
/* used to hold an arbitrary blob of data */
typedef struct datablob {
uint8_t *data;
Modified: branches/SAMBA_4_0/source/include/includes.h
===================================================================
--- branches/SAMBA_4_0/source/include/includes.h 2006-03-31 13:41:49 UTC (rev 14843)
+++ branches/SAMBA_4_0/source/include/includes.h 2006-03-31 23:28:18 UTC (rev 14844)
@@ -74,14 +74,6 @@
#include <stddef.h>
#include <sys/time.h>
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
-
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-
#ifdef HAVE_STRING_H
#include <string.h>
#endif
Modified: branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.h
===================================================================
--- branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.h 2006-03-31 13:41:49 UTC (rev 14843)
+++ branches/SAMBA_4_0/source/lib/appweb/mpr/miniMpr.h 2006-03-31 23:28:18 UTC (rev 14844)
@@ -185,8 +185,10 @@
#ifndef __cplusplus
typedef unsigned char uchar;
+#ifndef __bool_true_false_are_defined
typedef int bool;
#endif
+#endif
/*
* Porters: put other operating system type defines here
Modified: branches/SAMBA_4_0/source/lib/replace/README
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/README 2006-03-31 13:41:49 UTC (rev 14843)
+++ branches/SAMBA_4_0/source/lib/replace/README 2006-03-31 23:28:18 UTC (rev 14844)
@@ -52,6 +52,7 @@
readline (the library)
Types:
+bool
socklen_t
u_int{8,16,32}_t
uint_t
Modified: branches/SAMBA_4_0/source/lib/replace/config.m4
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/config.m4 2006-03-31 13:41:49 UTC (rev 14843)
+++ branches/SAMBA_4_0/source/lib/replace/config.m4 2006-03-31 23:28:18 UTC (rev 14844)
@@ -1,3 +1,4 @@
+AC_CHECK_HEADERS([stdint.h inttypes.h])
AC_CHECK_TYPE(uint_t, unsigned int)
AC_CHECK_TYPE(int8_t, signed char)
AC_CHECK_TYPE(uint8_t, unsigned char)
@@ -127,5 +128,7 @@
AC_CHECK_FUNCS([syslog memset setnetgrent getnetgrent endnetgrent memcpy],,
[AC_MSG_ERROR([Required function not found])])
+AC_CHECK_HEADERS(stdbool.h)
+
sinclude(lib/replace/readline.m4)
sinclude(lib/replace/getpass.m4)
Modified: branches/SAMBA_4_0/source/lib/replace/replace.h
===================================================================
--- branches/SAMBA_4_0/source/lib/replace/replace.h 2006-03-31 13:41:49 UTC (rev 14843)
+++ branches/SAMBA_4_0/source/lib/replace/replace.h 2006-03-31 23:28:18 UTC (rev 14844)
@@ -35,6 +35,14 @@
#define QSORT_CAST (int (*)(const void *, const void *))
#endif
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
#ifndef HAVE_STRERROR
extern char *sys_errlist[];
#define strerror(i) sys_errlist[i]
@@ -194,4 +202,13 @@
#define INT32_MAX _TYPE_MAXIMUM(int32_t)
#endif
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#else
+#define __bool_true_false_are_defined
+typedef bool int;
+#define false (0)
+#define true (1)
#endif
+
+#endif
Modified: branches/SAMBA_4_0/source/param/param.h
===================================================================
--- branches/SAMBA_4_0/source/param/param.h 2006-03-31 13:41:49 UTC (rev 14843)
+++ branches/SAMBA_4_0/source/param/param.h 2006-03-31 23:28:18 UTC (rev 14844)
@@ -41,6 +41,8 @@
struct param_context;
struct smbsrv_connection;
+#define Auto (2)
+
#include "param/proto.h"
#endif /* _PARAM_H */
More information about the samba-cvs
mailing list