[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Thu Jun 14 03:27:05 MDT 2012
The branch, master has been updated
via bc9003d tdb2: remove unused debug_fprintf() macro that breaks the build
via e2caba0 tdb: remove unused debug_fprintf() macro that breaks the build
via deca298 lib/replace: define HAVE_WORKING_STRPTIME instead of REPLACE_STRPTIME
via 0a92ac2 lib/replace: execute strptime.c tests
via e3a3c0d Revert "replace: use replace for non 'samba' compliant strptime"
via 4430d6a lib/replace: add more condition to add snprintf.c
via 1746ffe Revert "lib/replace: Fix snprintf() override for systems with a broken snprintf()"
via 4e1ebdc lib/replace: s/execute=1/execute=True
from 7e63e22 s3: Fix a comment
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit bc9003dd90072191822813d15b26ef850399c1e8
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jun 13 16:31:58 2012 +0200
tdb2: remove unused debug_fprintf() macro that breaks the build
The IRIX compiler doesn't support '...' in a macro.
metze
Autobuild-User(master): Stefan Metzmacher <metze at samba.org>
Autobuild-Date(master): Thu Jun 14 11:26:15 CEST 2012 on sn-devel-104
commit e2caba054f977b631720f8dc2528ba03dc237122
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jun 13 16:31:58 2012 +0200
tdb: remove unused debug_fprintf() macro that breaks the build
The IRIX compiler doesn't support '...' in a macro.
metze
commit deca298d7b5651276ab7cd8bcb3090a2a4946d79
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jun 11 09:11:17 2012 +0200
lib/replace: define HAVE_WORKING_STRPTIME instead of REPLACE_STRPTIME
That makes the logic in 'wscript' simpler.
metze
commit 0a92ac2ddc8d27c70d3399610c51d1ed65564239
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jun 13 13:17:46 2012 +0200
lib/replace: execute strptime.c tests
They need runtime verification.
metze
commit e3a3c0d7640f8fcefde901b7e35a2f22e7d3a033
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jun 13 12:41:57 2012 +0200
Revert "replace: use replace for non 'samba' compliant strptime"
This reverts commit 4ea7d4694a8353fc55ecd12cb09b9c91ffde7b3f.
A better fix will follow.
metze
commit 4430d6a0d9645f40acb297e77f8e73bab3e0ddb4
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jun 11 09:07:06 2012 +0200
lib/replace: add more condition to add snprintf.c
metze
commit 1746ffe090dbb254b943c9db09a42f528ab2dac7
Author: Stefan Metzmacher <metze at samba.org>
Date: Mon Jun 11 08:56:09 2012 +0200
Revert "lib/replace: Fix snprintf() override for systems with a broken snprintf()"
This reverts commit bbc1b0c9853322da10483f72c020fe0dd83b28fa.
A more generic fix will follow.
metze
commit 4e1ebdc0c4166beb5006aae2637b4628fe97d7a0
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed Jun 13 13:17:13 2012 +0200
lib/replace: s/execute=1/execute=True
metze
-----------------------------------------------------------------------
Summary of changes:
lib/replace/replace.h | 2 +-
lib/replace/strptime.m4 | 5 +++-
lib/replace/wscript | 43 ++++++++++++++---------------------------
lib/tdb/tools/tdbrestore.c | 2 -
lib/tdb2/tools/tdb2restore.c | 2 -
5 files changed, 20 insertions(+), 34 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index 776da8a..bb271d4 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -451,7 +451,7 @@ void rep_vsyslog (int facility_priority, const char *format, va_list arglist) PR
typedef int (*comparison_fn_t)(const void *, const void *);
#endif
-#ifdef REPLACE_STRPTIME
+#ifndef HAVE_WORKING_STRPTIME
#define strptime rep_strptime
struct tm;
char *rep_strptime(const char *buf, const char *format, struct tm *tm);
diff --git a/lib/replace/strptime.m4 b/lib/replace/strptime.m4
index b1a56b4..8ac22f6 100644
--- a/lib/replace/strptime.m4
+++ b/lib/replace/strptime.m4
@@ -1,3 +1,5 @@
+AC_CHECK_FUNCS(strptime)
+AC_CHECK_DECLS(strptime, [], [], [#include <time.h>])
AC_CACHE_CHECK([whether strptime is available and works],libreplace_cv_STRPTIME_OK,[
AC_TRY_RUN([
#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
@@ -8,6 +10,7 @@ AC_CACHE_CHECK([whether strptime is available and works],libreplace_cv_STRPTIME_
[libreplace_cv_STRPTIME_OK="assuming not"])
])
if test x"$libreplace_cv_STRPTIME_OK" != x"yes"; then
- AC_DEFINE(REPLACE_STRPTIME,1,[Whether strptime should be replaced])
LIBREPLACEOBJ="${LIBREPLACEOBJ} $libreplacedir/strptime.o"
+else
+ AC_DEFINE(HAVE_WORKING_STRPTIME,1,[Whether strptime is working correct])
fi
diff --git a/lib/replace/wscript b/lib/replace/wscript
index efde441..7e4055b 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -311,37 +311,20 @@ removeea setea
conf.CHECK_HEADERS('poll.h')
conf.CHECK_FUNCS('poll')
- if not conf.CHECK_CODE('''#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
- #include "test/strptime.c"''',
- define='HAVE_STRPTIME',
- addmain=False,
- msg='Checking for working strptime'):
- conf.DEFINE('REPLACE_STRPTIME', 1)
- else:
- conf.CHECK_CODE('''
- const char *s = "20070414101546Z";
- char *ret;
- struct tm t;
- memset(&t, 0, sizeof(t));
- ret = strptime(s, "%Y%m%d%H%M%S", &t);
- if (ret == NULL || t.tm_wday != 6) {
- return 0;
- } else {
- return 1;
- }
- ''',
- msg="Checking correct behavior of strptime",
- headers = 'time.h',
- execute = True,
- define_ret = True,
- define = 'REPLACE_STRPTIME',
- )
+ conf.CHECK_FUNCS('strptime')
+ conf.CHECK_DECLS('strptime', headers='time.h')
+ conf.CHECK_CODE('''#define LIBREPLACE_CONFIGURE_TEST_STRPTIME
+ #include "test/strptime.c"''',
+ define='HAVE_WORKING_STRPTIME',
+ execute=True,
+ addmain=False,
+ msg='Checking for working strptime')
conf.CHECK_CODE('gettimeofday(NULL, NULL)', 'HAVE_GETTIMEOFDAY_TZ', execute=False)
conf.CHECK_CODE('#include "test/snprintf.c"',
define="HAVE_C99_VSNPRINTF",
- execute=1,
+ execute=True,
addmain=False,
msg="Checking for C99 vsnprintf")
@@ -475,6 +458,12 @@ REPLACEMENT_FUNCTIONS = {
'dprintf', 'get_current_dir_name',
'strerror_r', 'clock_gettime'],
'timegm.c': ['timegm'],
+ # Note: C99_VSNPRINTF is not a function, but a special condition
+ # for replacement
+ 'snprintf.c': ['C99_VSNPRINTF', 'snprintf', 'vsnprintf', 'asprintf', 'vasprintf'],
+ # Note: WORKING_STRPTIME is not a function, but a special condition
+ # for replacement
+ 'strptime.c': ['WORKING_STRPTIME', 'strptime'],
}
@@ -483,8 +472,6 @@ def build(bld):
REPLACE_HOSTCC_SOURCE = ''
- if not bld.CONFIG_SET('HAVE_C99_VSNPRINTF'): REPLACE_HOSTCC_SOURCE += ' snprintf.c'
- if bld.CONFIG_SET('REPLACE_STRPTIME'): REPLACE_HOSTCC_SOURCE += ' strptime.c'
for filename, functions in REPLACEMENT_FUNCTIONS.iteritems():
for function in functions:
if not bld.CONFIG_SET('HAVE_%s' % function.upper()):
diff --git a/lib/tdb/tools/tdbrestore.c b/lib/tdb/tools/tdbrestore.c
index 8106cf9..f65b36f 100644
--- a/lib/tdb/tools/tdbrestore.c
+++ b/lib/tdb/tools/tdbrestore.c
@@ -25,8 +25,6 @@
#include "system/wait.h"
#include "tdb.h"
-#define debug_fprintf(file, fmt, ...) do {/*nothing*/} while (0)
-
static int read_linehead(FILE *f)
{
int i, c;
diff --git a/lib/tdb2/tools/tdb2restore.c b/lib/tdb2/tools/tdb2restore.c
index 608b46d..93c6c8b 100644
--- a/lib/tdb2/tools/tdb2restore.c
+++ b/lib/tdb2/tools/tdb2restore.c
@@ -31,8 +31,6 @@
#include <stdlib.h>
#endif
-#define debug_fprintf(file, fmt, ...) do {/*nothing*/} while (0)
-
static int read_linehead(FILE *f)
{
int i, c;
--
Samba Shared Repository
More information about the samba-cvs
mailing list