]> git.donarmstrong.com Git - lilypond.git/blob - guile18/libguile/guile.c
New upstream version 2.19.65
[lilypond.git] / guile18 / libguile / guile.c
1 /* Copyright (C) 1996,1997,2000,2001, 2006, 2008 Free Software Foundation, Inc.
2  * 
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2.1 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * Lesser General Public License for more details.
12  *
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
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16  */
17
18 /* This is the 'main' function for the `guile' executable.  It is not
19    included in libguile.a.
20
21    Eventually, we hope this file will be automatically generated,
22    based on the list of installed, statically linked libraries on the
23    system.  For now, please don't put interesting code in here.  */
24
25 #ifdef HAVE_CONFIG_H
26 #  include <config.h>
27 #endif
28
29 #ifdef __MINGW32__
30 # define SCM_IMPORT 1
31 #endif
32 #include <libguile.h>
33
34 #ifdef HAVE_CONFIG_H
35 #include <libguile/scmconfig.h>
36 #endif
37 #include <ltdl.h>
38
39 #ifdef HAVE_WINSOCK2_H
40 #include <winsock2.h>
41 #endif
42
43 static void
44 inner_main (void *closure SCM_UNUSED, int argc, char **argv)
45 {
46 #ifdef __MINGW32__
47   /* This is necessary to startup the Winsock API under Win32. */
48   WSADATA WSAData;
49   WSAStartup (0x0202, &WSAData);
50 #endif /* __MINGW32__ */
51
52   /* module initializations would go here */
53   scm_shell (argc, argv);
54
55 #ifdef __MINGW32__
56   WSACleanup ();
57 #endif /* __MINGW32__ */
58 }
59
60 int
61 main (int argc, char **argv)
62 {
63   scm_boot_guile (argc, argv, inner_main, 0);
64   return 0; /* never reached */
65 }
66
67 /*
68   Local Variables:
69   c-file-style: "gnu"
70   End:
71 */