structs with tail arrays are not simple
[bpt/guile.git] / libguile / guile.c
CommitLineData
b57bf272 1/* Copyright (C) 1996,1997,2000,2001, 2006, 2008, 2011 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>
47GDB_INTERFACE;
48
49static void
e81d98ec 50inner_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
67int
68main (int argc, char **argv)
69{
b57bf272 70 scm_install_gmp_memory_functions = 1;
0487b82f
JB
71 scm_boot_guile (argc, argv, inner_main, 0);
72 return 0; /* never reached */
73}
89e00824
ML
74
75/*
76 Local Variables:
77 c-file-style: "gnu"
78 End:
79*/