SQLite

Check-in [8044623062]
Login

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

Overview
Comment:Clean up recent autoconf-related additions, add config.h to the amalgamation (CVS 4833)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 8044623062e9aa43593c46e3e5d5bc7361ea7418
User & Date: mlcreech 2008-03-06 16:28:58.000
Context
2008-03-07
00:27
Updates to the locking-style code in os_unix.c. Not yet working. (CVS 4834) (check-in: 6ebce3b798 user: drh tags: trunk)
2008-03-06
16:28
Clean up recent autoconf-related additions, add config.h to the amalgamation (CVS 4833) (check-in: 8044623062 user: mlcreech tags: trunk)
09:58
Handle non-autoconf build correctly with new changes (CVS 4832) (check-in: e2a9f5f105 user: mlcreech tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to Makefile.in.
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
BCC = @BUILD_CC@ @BUILD_CFLAGS@

# C Compile and options for use in building executables that 
# will run on the target platform.  (BCC and TCC are usually the
# same unless your are cross-compiling.)
#
TCC = @CC@ @CPPFLAGS@ @CFLAGS@ -I. -I${TOP}/src -DSQLITE_STANDARD_BUILD=1

# Define -DNDEBUG to compile without debugging (i.e., for production usage)
# Omitting the define will cause extra debugging code to be inserted and
# includes extra comments when "EXPLAIN stmt" is used.
#
TCC += @TARGET_DEBUG@ @XTHREADCONNECT@








|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
BCC = @BUILD_CC@ @BUILD_CFLAGS@

# C Compile and options for use in building executables that 
# will run on the target platform.  (BCC and TCC are usually the
# same unless your are cross-compiling.)
#
TCC = @CC@ @CPPFLAGS@ @CFLAGS@ -I. -I${TOP}/src

# Define -DNDEBUG to compile without debugging (i.e., for production usage)
# Omitting the define will cause extra debugging code to be inserted and
# includes extra comments when "EXPLAIN stmt" is used.
#
TCC += @TARGET_DEBUG@ @XTHREADCONNECT@

154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
  $(TOP)/src/auth.c \
  $(TOP)/src/bitvec.c \
  $(TOP)/src/btmutex.c \
  $(TOP)/src/btree.c \
  $(TOP)/src/btree.h \
  $(TOP)/src/build.c \
  $(TOP)/src/callback.c \
  $(TOP)/src/common.h \
  $(TOP)/src/complete.c \
  $(TOP)/src/config.h \
  $(TOP)/src/date.c \
  $(TOP)/src/delete.c \
  $(TOP)/src/expr.c \
  $(TOP)/src/fault.c \
  $(TOP)/src/func.c \







<







154
155
156
157
158
159
160

161
162
163
164
165
166
167
  $(TOP)/src/auth.c \
  $(TOP)/src/bitvec.c \
  $(TOP)/src/btmutex.c \
  $(TOP)/src/btree.c \
  $(TOP)/src/btree.h \
  $(TOP)/src/build.c \
  $(TOP)/src/callback.c \

  $(TOP)/src/complete.c \
  $(TOP)/src/config.h \
  $(TOP)/src/date.c \
  $(TOP)/src/delete.c \
  $(TOP)/src/expr.c \
  $(TOP)/src/fault.c \
  $(TOP)/src/func.c \
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
   opcodes.h \
   $(TOP)/src/os.h \
   $(TOP)/src/os_common.h \
   $(TOP)/src/sqlite3ext.h \
   $(TOP)/src/sqliteInt.h  \
   $(TOP)/src/vdbe.h \
   parse.h \
   $(TOP)/src/common.h \
   $(TOP)/src/config.h

# Header files used by extensions
#
HDR += \
  $(TOP)/ext/fts1/fts1.h \
  $(TOP)/ext/fts1/fts1_hash.h \







<







316
317
318
319
320
321
322

323
324
325
326
327
328
329
   opcodes.h \
   $(TOP)/src/os.h \
   $(TOP)/src/os_common.h \
   $(TOP)/src/sqlite3ext.h \
   $(TOP)/src/sqliteInt.h  \
   $(TOP)/src/vdbe.h \
   parse.h \

   $(TOP)/src/config.h

# Header files used by extensions
#
HDR += \
  $(TOP)/ext/fts1/fts1.h \
  $(TOP)/ext/fts1/fts1_hash.h \
Changes to main.mk.
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
  $(TOP)/src/bitvec.c \
  $(TOP)/src/btmutex.c \
  $(TOP)/src/btree.c \
  $(TOP)/src/btree.h \
  $(TOP)/src/btreeInt.h \
  $(TOP)/src/build.c \
  $(TOP)/src/callback.c \
  $(TOP)/src/common.h \
  $(TOP)/src/complete.c \
  $(TOP)/src/config.h \
  $(TOP)/src/date.c \
  $(TOP)/src/delete.c \
  $(TOP)/src/expr.c \
  $(TOP)/src/fault.c \
  $(TOP)/src/func.c \







<







88
89
90
91
92
93
94

95
96
97
98
99
100
101
  $(TOP)/src/bitvec.c \
  $(TOP)/src/btmutex.c \
  $(TOP)/src/btree.c \
  $(TOP)/src/btree.h \
  $(TOP)/src/btreeInt.h \
  $(TOP)/src/build.c \
  $(TOP)/src/callback.c \

  $(TOP)/src/complete.c \
  $(TOP)/src/config.h \
  $(TOP)/src/date.c \
  $(TOP)/src/delete.c \
  $(TOP)/src/expr.c \
  $(TOP)/src/fault.c \
  $(TOP)/src/func.c \
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
   parse.h  \
   sqlite3.h  \
   $(TOP)/src/sqlite3ext.h \
   $(TOP)/src/sqliteInt.h  \
   $(TOP)/src/sqliteLimit.h \
   $(TOP)/src/vdbe.h \
   $(TOP)/src/vdbeInt.h \
   $(TOP)/src/common.h \
   $(TOP)/src/config.h

# Header files used by extensions
#
EXTHDR += \
  $(TOP)/ext/fts1/fts1.h \
  $(TOP)/ext/fts1/fts1_hash.h \







<







254
255
256
257
258
259
260

261
262
263
264
265
266
267
   parse.h  \
   sqlite3.h  \
   $(TOP)/src/sqlite3ext.h \
   $(TOP)/src/sqliteInt.h  \
   $(TOP)/src/sqliteLimit.h \
   $(TOP)/src/vdbe.h \
   $(TOP)/src/vdbeInt.h \

   $(TOP)/src/config.h

# Header files used by extensions
#
EXTHDR += \
  $(TOP)/ext/fts1/fts1.h \
  $(TOP)/ext/fts1/fts1_hash.h \
Deleted src/common.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
** 2008 March 6
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Common includes/defines based on output of configure script
**
** @(#) $Id: common.h,v 1.2 2008/03/06 09:58:50 mlcreech Exp $
*/
#ifndef _COMMON_H_
#define _COMMON_H_

/*
** Include the configuration header output by 'configure' if it was run
** (otherwise we get an empty default).
*/
#include "config.h"

/* Needed for various definitions... */
#define _GNU_SOURCE

/*
** Include standard header files as necessary
*/
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif

/*
** If possible, use the C99 intptr_t type to define an integral type of
** equivalent size to a pointer.  (Technically it's >= sizeof(void *), but
** practically it's == sizeof(void *)).  We fall back to an int if this type
** isn't defined.
*/
#ifdef HAVE_INTPTR_T
  typedef intptr_t sqlite3_intptr_t;
# define __sqlite3_intptr_defined
#endif

#endif
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<














































































































Changes to src/config.h.in.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2008 March 6
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Configuration header template to be filled in by 'configure' script
**
** @(#) $Id: config.h.in,v 1.1 2008/03/06 07:36:18 mlcreech Exp $
*/
#ifndef _CONFIG_H_
#define _CONFIG_H_

/* Define as 1 if you have the int8_t type */
#undef HAVE_INT8_T














|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
** 2008 March 6
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Configuration header template to be filled in by 'configure' script
**
** @(#) $Id: config.h.in,v 1.2 2008/03/06 16:28:58 mlcreech Exp $
*/
#ifndef _CONFIG_H_
#define _CONFIG_H_

/* Define as 1 if you have the int8_t type */
#undef HAVE_INT8_T

41
42
43
44
45
46
47









48
49
50
51
52
#undef HAVE_UINT32_T

/* Define as 1 if you have the uint64_t type */
#undef HAVE_UINT64_T

/* Define as 1 if you have the uintptr_t type */
#undef HAVE_UINTPTR_T










/* Define as 1 if you have the inttypes.h header */
#undef HAVE_INTTYPES_H

#endif







>
>
>
>
>
>
>
>
>





41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#undef HAVE_UINT32_T

/* Define as 1 if you have the uint64_t type */
#undef HAVE_UINT64_T

/* Define as 1 if you have the uintptr_t type */
#undef HAVE_UINTPTR_T

/* Define as 1 if you have the sys/types.h header */
#undef HAVE_SYS_TYPES_H

/* Define as 1 if you have the stdlib.h header */
#undef HAVE_STDLIB_H

/* Define as 1 if you have the stdint.h header */
#undef HAVE_STDINT_H

/* Define as 1 if you have the inttypes.h header */
#undef HAVE_INTTYPES_H

#endif
Changes to src/sqliteInt.h.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19




20


21


22



23
24
25






26







27
28

29
30

31
32
33
34
35
36
37
/*
** 2001 September 15
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.669 2008/03/06 09:58:50 mlcreech Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_

/*




** Do not try to include this file when building the amalgamation outside of


** the SQLite source tree.


*/



#ifdef SQLITE_STANDARD_BUILD
# include "common.h"
#endif














#ifndef __sqlite3_intptr_defined
  /* Fallbacks if doing a standalone build... */

  typedef int sqlite3_intptr_t;
#endif


/*
** The macro unlikely() is a hint that surrounds a boolean
** expression that is usually false.  Macro likely() surrounds
** a boolean expression that is usually true.  GCC is able to
** use these hints to generate better code, sometimes.
*/













|





>
>
>
>
|
>
>
|
>
>

>
>
>
|
|

>
>
>
>
>
>

>
>
>
>
>
>
>
|
<
>


>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

52
53
54
55
56
57
58
59
60
61
62
/*
** 2001 September 15
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Internal interface definitions for SQLite.
**
** @(#) $Id: sqliteInt.h,v 1.670 2008/03/06 16:28:58 mlcreech Exp $
*/
#ifndef _SQLITEINT_H_
#define _SQLITEINT_H_

/*
** Include the configuration header output by 'configure' if it was run
** (otherwise we get an empty default).
*/
#include "config.h"

/* Needed for various definitions... */
#define _GNU_SOURCE

/*
** Include standard header files as necessary
*/
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
#ifdef HAVE_INTTYPES_H
#include <inttypes.h>
#endif

/*
** If possible, use the C99 intptr_t type to define an integral type of
** equivalent size to a pointer.  (Technically it's >= sizeof(void *), but
** practically it's == sizeof(void *)).  We fall back to an int if this type
** isn't defined.
*/
#ifdef HAVE_INTPTR_T
  typedef intptr_t sqlite3_intptr_t;

#else
  typedef int sqlite3_intptr_t;
#endif


/*
** The macro unlikely() is a hint that surrounds a boolean
** expression that is usually false.  Macro likely() surrounds
** a boolean expression that is usually true.  GCC is able to
** use these hints to generate better code, sometimes.
*/
Changes to tool/mksqlite3c.tcl.
84
85
86
87
88
89
90

91
92
93
94
95
96
97
# These are the header files used by SQLite.  The first time any of these 
# files are seen in a #include statement in the C code, include the complete
# text of the file in-line.  The file only needs to be included once.
#
foreach hdr {
   btree.h
   btreeInt.h

   fts3.h
   fts3_hash.h
   fts3_tokenizer.h
   hash.h
   keywordhash.h
   mutex.h
   opcodes.h







>







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# These are the header files used by SQLite.  The first time any of these 
# files are seen in a #include statement in the C code, include the complete
# text of the file in-line.  The file only needs to be included once.
#
foreach hdr {
   btree.h
   btreeInt.h
   config.h
   fts3.h
   fts3_hash.h
   fts3_tokenizer.h
   hash.h
   keywordhash.h
   mutex.h
   opcodes.h