Fossil

Check-in [8027c7e648]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Back out the previous check-in - no changes needed for strcmp().
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8027c7e64831555f29f9a098889f75e575be9e6a
User & Date: drh 2013-01-30 18:14:26.698
Context
2013-01-30
21:39
make sure that -ldl is added to the linker flags, in case the platform needs it (e.g. Ubuntu on AMD64 with --static) ... (check-in: 7dda61ec4a user: jan.nijtmans tags: trunk)
18:14
Back out the previous check-in - no changes needed for strcmp(). ... (check-in: 8027c7e648 user: drh tags: trunk)
13:10
Make sure that "fossil_strcmp" is used everywhere in stead of "strcmp": The "strcmp" function from the C library is not usable in all situations, e.g. with --static on Linux Do an #undef in printf.c, preventing that the fossil_strcmp function is optimized for non-null arguments. ... (check-in: afffe48643 user: jan.nijtmans tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to Makefile.in.
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

#### Tcl shell for use in running the fossil testsuite.  If you do not
#    care about testing the end result, this can be blank.
#
TCLSH = tclsh

LIB =	@LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
TCC +=	@EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H -Dstrcmp=fossil_strcmp
INSTALLDIR = $(DESTDIR)@prefix@/bin
USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@
FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@

include $(SRCDIR)/main.mk








|







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

#### Tcl shell for use in running the fossil testsuite.  If you do not
#    care about testing the end result, this can be blank.
#
TCLSH = tclsh

LIB =	@LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
TCC +=	@EXTRA_CFLAGS@ @CPPFLAGS@ @CFLAGS@ -DHAVE_AUTOCONFIG_H
INSTALLDIR = $(DESTDIR)@prefix@/bin
USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
FOSSIL_ENABLE_TCL = @FOSSIL_ENABLE_TCL@
FOSSIL_ENABLE_TCL_STUBS = @FOSSIL_ENABLE_TCL_STUBS@

include $(SRCDIR)/main.mk

Changes to src/printf.c.
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
**   drh@hwaci.com
**   http://www.hwaci.com/drh/
**
*******************************************************************************
**
** An implementation of printf() with extra conversion fields.
*/

/* prevent "fossil_strcmp" to be optimized using the assumption
 * that its arguments cannot be NULL */
#undef fossil_strcmp

#include "config.h"
#include "printf.h"

/*
** Conversion types fall into various categories as defined by the
** following enumeration.
*/







<
<
<
<
<







13
14
15
16
17
18
19





20
21
22
23
24
25
26
**   drh@hwaci.com
**   http://www.hwaci.com/drh/
**
*******************************************************************************
**
** An implementation of printf() with extra conversion fields.
*/





#include "config.h"
#include "printf.h"

/*
** Conversion types fall into various categories as defined by the
** following enumeration.
*/