Documentation Source Text

Check-in [b23ac4e38d]
Login

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

Overview
Comment:Add linkage macros to the compile-time macro page.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b23ac4e38d86f93eb6f8aa55fc165d1f900e15f6
User & Date: drh 2016-07-28 17:45:37.243
Context
2016-07-28
19:26
Updates to the 3.14 change log. (check-in: 6bc4912659 user: drh tags: trunk)
17:45
Add linkage macros to the compile-time macro page. (check-in: b23ac4e38d user: drh tags: trunk)
16:04
Fix a typo in a snippet() example in the FTS3 documentation. (check-in: d2cba16a38 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/compile.in.
1481
1482
1483
1484
1485
1486
1487

















































































1488
1489
}

COMPILE_OPTION {SQLITE_WIN32_MALLOC_VALIDATE} {
  This option forces the Win32 native memory allocator, when enabled, to
  make strategic calls into the HeapValidate() function if assert() is also
  enabled.
}


















































































</tcl>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
}

COMPILE_OPTION {SQLITE_WIN32_MALLOC_VALIDATE} {
  This option forces the Win32 native memory allocator, when enabled, to
  make strategic calls into the HeapValidate() function if assert() is also
  enabled.
}

</tcl>
<a name="linkage"></a>
<h2>1.10 Compiler Linkage Control</h2>

<p>The following macros specify
interface linkage for certain kinds of SQLite builds.  The Makefiles will normally
handle setting these macros automatically.  Application developers should
not need to worry with these macros.  The following documention aboue these 
macros is included completeness.</p>

<tcl>
COMPILE_OPTION {SQLITE_API} {
  This macro identifies a externally visible interface for SQLite.
  This macro is sometimes set to "extern".  But the definition is
  compiler-specific.
}

COMPILE_OPTION {SQLITE_APICALL} {
  This macro identifies the calling convention used by public interface
  routines in SQLite.  This macro is normally defined to be nothing,
  though on Windows builds it can sometimes be set to "__cdecl" or "__stdcall".
  The "__cdecl" setting is the default, but "__stdcall" is used when SQLite
  is intended to be compiled as a Windows system library.
  <p>
  A single function declaration should contain no more than one of
  the following:  [SQLITE_APICALL], [SQLITE_CALLBACK], [SQLITE_CDECL],
  or [SQLITE_SYSCALL].
}

COMPILE_OPTION {SQLITE_CALLBACK} {
  This macro specifies the calling convention used by callback pointers
  in SQLite.  This macro is normally defined to be nothing, though on Windows
  builds it can sometimes be set to "__cdecl" or "__stdcall".  The
  "__cdecl" setting is the default, but "__stdcall" is used when SQLite
  is intended to be compiled as a Windows system library.
  <p>
  A single function declaration should contain no more than one of
  the following:  [SQLITE_APICALL], [SQLITE_CALLBACK], [SQLITE_CDECL],
  or [SQLITE_SYSCALL].
}

COMPILE_OPTION {SQLITE_CDECL} {
  This macro specifies the calling convention used by varargs interface
  routines in SQLite.  This macro is normally defined to be nothing,
  though on Windows builds it can sometimes be set to "__cdecl".  This
  macro is used on varargs routines and so cannot be set to "__stdcall"
  since the __stdcall calling convention does not support varargs functions.
  <p>
  A single function declaration should contain no more than one of
  the following:  [SQLITE_APICALL], [SQLITE_CALLBACK], [SQLITE_CDECL],
  or [SQLITE_SYSCALL].
}

COMPILE_OPTION {SQLITE_SYSCALL} {
  This macro identifies the calling convention used by operating system
  interfaces for target the platform for an SQLite build.
  This macro is normally defined to be nothing, though on Windows
  builds it can sometimes be set to "__stdcall".
  <p>
  A single function declaration should contain no more than one of
  the following:  [SQLITE_APICALL], [SQLITE_CALLBACK], [SQLITE_CDECL],
  or [SQLITE_SYSCALL].
}

COMPILE_OPTION {SQLITE_TCLAPI} {
  This macro specifies the calling convention used by the 
  [http://www.tcl.tk | TCL] library interface routines.
  This macro is not used by the SQLite core, but only by the [TCL Interface]
  and [TCL test suite].
  This macro is normally defined to be nothing,
  though on Windows builds it can sometimes be set to "__cdecl".  This
  macro is used on TCL library interface routines which are always compiled
  as __cdecl, even on platforms that prefer to use __stdcall, so this
  macro should not be set to __stdcall unless the platform as a custom
  TCL library build that supports __stdcall.
  <p>
  This macro may not be used in combination with any of [SQLITE_APICALL],
  [SQLITE_CALLBACK], [SQLITE_CDECL], or [SQLITE_SYSCALL].
}


</tcl>