18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
** This module codes the main() procedure that runs first when the
** program is invoked.
*/
#include "VERSION.h"
#include "config.h"
#if defined(_WIN32)
# include <windows.h>
#endif
#include "main.h"
#include <string.h>
#include <time.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h> /* atexit() */
#if !defined(_WIN32)
# include <errno.h> /* errno global */
#endif
#ifdef FOSSIL_ENABLE_SSL
# include "openssl/crypto.h"
#endif
#if defined(FOSSIL_ENABLE_MINIZ)
# define MINIZ_HEADER_FILE_ONLY
# include "miniz.c"
|
>
>
>
>
|
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
|
** This module codes the main() procedure that runs first when the
** program is invoked.
*/
#include "VERSION.h"
#include "config.h"
#if defined(_WIN32)
# include <windows.h>
# define GETPID (int)GetCurrentProcessId
#endif
#include "main.h"
#include <string.h>
#include <time.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h> /* atexit() */
#if !defined(_WIN32)
# include <errno.h> /* errno global */
# include <unistd.h>
# include <signal.h>
# define GETPID getpid
#endif
#ifdef FOSSIL_ENABLE_SSL
# include "openssl/crypto.h"
#endif
#if defined(FOSSIL_ENABLE_MINIZ)
# define MINIZ_HEADER_FILE_ONLY
# include "miniz.c"
|
597
598
599
600
601
602
603
604
605
606
607
608
609
610
|
#endif
int main(int argc, char **argv)
#endif
{
const char *zCmdName = "unknown";
const CmdOrPage *pCmd = 0;
int rc;
fossil_limit_memory(1);
if( sqlite3_libversion_number()<3014000 ){
fossil_panic("Unsuitable SQLite version %s, must be at least 3.14.0",
sqlite3_libversion());
}
sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
|
#endif
int main(int argc, char **argv)
#endif
{
const char *zCmdName = "unknown";
const CmdOrPage *pCmd = 0;
int rc;
#if !defined(_WIN32_WCE)
if( fossil_getenv("FOSSIL_BREAK") ){
if( isatty(0) && isatty(2) ){
fprintf(stderr,
"attach debugger to process %d and press any key to continue.\n",
GETPID());
fgetc(stdin);
}else{
#if defined(_WIN32) || defined(WIN32)
DebugBreak();
#elif defined(SIGTRAP)
raise(SIGTRAP);
#endif
}
}
#endif
fossil_limit_memory(1);
if( sqlite3_libversion_number()<3014000 ){
fossil_panic("Unsuitable SQLite version %s, must be at least 3.14.0",
sqlite3_libversion());
}
sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
|