Commit | Line | Data |
---|---|---|
1da93484 | 1 | /* Copyright (C) 1996,1997,2000,2001, 2006, 2008 Free Software Foundation, Inc. |
0487b82f | 2 | * |
73be1d9e | 3 | * This library is free software; you can redistribute it and/or |
53befeb7 NJ |
4 | * modify it under the terms of the GNU Lesser General Public License |
5 | * as published by the Free Software Foundation; either version 3 of | |
6 | * the License, or (at your option) any later version. | |
0487b82f | 7 | * |
53befeb7 NJ |
8 | * This library is distributed in the hope that it will be useful, but |
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
73be1d9e MV |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 | * Lesser General Public License for more details. | |
0487b82f | 12 | * |
73be1d9e MV |
13 | * You should have received a copy of the GNU Lesser General Public |
14 | * License along with this library; if not, write to the Free Software | |
53befeb7 NJ |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
16 | * 02110-1301 USA | |
73be1d9e | 17 | */ |
0487b82f JB |
18 | |
19 | /* This is the 'main' function for the `guile' executable. It is not | |
20 | included in libguile.a. | |
21 | ||
22 | Eventually, we hope this file will be automatically generated, | |
23 | based on the list of installed, statically linked libraries on the | |
24 | system. For now, please don't put interesting code in here. */ | |
25 | ||
dbb605f5 | 26 | #ifdef HAVE_CONFIG_H |
e938aff1 RB |
27 | # include <config.h> |
28 | #endif | |
29 | ||
d7db9f60 | 30 | #ifdef __MINGW32__ |
8f99e3f3 | 31 | # define SCM_IMPORT 1 |
d7db9f60 | 32 | #endif |
0487b82f JB |
33 | #include <libguile.h> |
34 | ||
4ed6bae2 | 35 | #ifdef HAVE_CONFIG_H |
a0599745 | 36 | #include <libguile/scmconfig.h> |
4ed6bae2 | 37 | #endif |
a8255dca | 38 | #include <ltdl.h> |
4ed6bae2 | 39 | |
f87c105a | 40 | #ifdef HAVE_WINSOCK2_H |
82893676 MG |
41 | #include <winsock2.h> |
42 | #endif | |
43 | ||
0487b82f JB |
44 | /* Debugger interface (don't change the order of the following lines) */ |
45 | #define GDB_TYPE SCM | |
46 | #include <libguile/gdb_interface.h> | |
47 | GDB_INTERFACE; | |
48 | ||
49 | static void | |
e81d98ec | 50 | inner_main (void *closure SCM_UNUSED, int argc, char **argv) |
0487b82f | 51 | { |
82893676 MG |
52 | #ifdef __MINGW32__ |
53 | /* This is necessary to startup the Winsock API under Win32. */ | |
54 | WSADATA WSAData; | |
55 | WSAStartup (0x0202, &WSAData); | |
56 | GDB_INTERFACE_INIT; | |
57 | #endif /* __MINGW32__ */ | |
58 | ||
0487b82f JB |
59 | /* module initializations would go here */ |
60 | scm_shell (argc, argv); | |
82893676 MG |
61 | |
62 | #ifdef __MINGW32__ | |
63 | WSACleanup (); | |
64 | #endif /* __MINGW32__ */ | |
0487b82f JB |
65 | } |
66 | ||
67 | int | |
68 | main (int argc, char **argv) | |
69 | { | |
70 | scm_boot_guile (argc, argv, inner_main, 0); | |
71 | return 0; /* never reached */ | |
72 | } | |
89e00824 ML |
73 | |
74 | /* | |
75 | Local Variables: | |
76 | c-file-style: "gnu" | |
77 | End: | |
78 | */ |