~peter-pearse/ubuntu/natty/guile-1.8/prop001

« back to all changes in this revision

Viewing changes to libguile/guile.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Schepler
  • Date: 2006-11-09 03:11:16 UTC
  • Revision ID: james.westby@ubuntu.com-20061109031116-hu0q1jxqg12y6yeg
Tags: upstream-1.8.1+1
ImportĀ upstreamĀ versionĀ 1.8.1+1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 1996,1997,2000,2001, 2006 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
#if 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
/* Debugger interface (don't change the order of the following lines) */
 
44
#define GDB_TYPE SCM
 
45
#include <libguile/gdb_interface.h>
 
46
GDB_INTERFACE;
 
47
 
 
48
static void
 
49
inner_main (void *closure SCM_UNUSED, int argc, char **argv)
 
50
{
 
51
#ifdef __MINGW32__
 
52
  /* This is necessary to startup the Winsock API under Win32. */
 
53
  WSADATA WSAData;
 
54
  WSAStartup (0x0202, &WSAData);
 
55
  GDB_INTERFACE_INIT;
 
56
#endif /* __MINGW32__ */
 
57
 
 
58
  /* module initializations would go here */
 
59
  scm_shell (argc, argv);
 
60
 
 
61
#ifdef __MINGW32__
 
62
  WSACleanup ();
 
63
#endif /* __MINGW32__ */
 
64
}
 
65
 
 
66
int
 
67
main (int argc, char **argv)
 
68
{
 
69
#if !defined (__MINGW32__)
 
70
  /* libtool automagically inserts this variable into your executable... */
 
71
  extern const lt_dlsymlist lt_preloaded_symbols[];
 
72
  lt_dlpreload_default (lt_preloaded_symbols);
 
73
#endif
 
74
  scm_boot_guile (argc, argv, inner_main, 0);
 
75
  return 0; /* never reached */
 
76
}
 
77
 
 
78
/*
 
79
  Local Variables:
 
80
  c-file-style: "gnu"
 
81
  End:
 
82
*/