~burner/xsb/debianized-xsb

« back to all changes in this revision

Viewing changes to emu/dynload.c

  • Committer: Michael R. Head
  • Date: 2006-09-06 22:11:55 UTC
  • Revision ID: burner@n23-20060906221155-7e398d23438a7ee4
Add the files from the 3.0.1 release package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* File:      dynload.c
 
2
** Author(s): Jiyang Xu, Kostis Sagonas, Steve Dawson
 
3
** Contact:   xsb-contact@cs.sunysb.edu
 
4
** 
 
5
** Copyright (C) The Research Foundation of SUNY, 1986, 1993-1998
 
6
** Copyright (C) ECRC, Germany, 1990
 
7
** 
 
8
** XSB is free software; you can redistribute it and/or modify it under the
 
9
** terms of the GNU Library General Public License as published by the Free
 
10
** Software Foundation; either version 2 of the License, or (at your option)
 
11
** any later version.
 
12
** 
 
13
** XSB is distributed in the hope that it will be useful, but WITHOUT ANY
 
14
** WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
15
** FOR A PARTICULAR PURPOSE.  See the GNU Library General Public License for
 
16
** more details.
 
17
** 
 
18
** You should have received a copy of the GNU Library General Public License
 
19
** along with XSB; if not, write to the Free Software Foundation,
 
20
** Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
21
**
 
22
** $Id: dynload.c,v 1.9 2005/11/29 00:02:16 tswift Exp $
 
23
** 
 
24
*/
 
25
 
 
26
 
 
27
#include "xsb_config.h"  /* This should appear BEFORE the ifdef! */
 
28
 
 
29
extern char executable_path_gl[];         /* from orient_xsb.c */
 
30
 
 
31
#ifdef FOREIGN
 
32
 
 
33
#ifdef FOREIGN_ELF
 
34
#include "dynelf_xsb_i.h"
 
35
#else
 
36
#ifdef FOREIGN_AOUT
 
37
#include "dynaout_xsb_i.h"
 
38
#else
 
39
#ifdef FOREIGN_WIN32
 
40
#include "dynwin32_xsb_i.h"
 
41
#endif /* FOREIGN_WIN32 */
 
42
#endif /* FOREIGN_AOUT */
 
43
#endif /* FOREIGN_ELF */
 
44
 
 
45
/*----------------------------------------------------------------------*/
 
46
 
 
47
byte *load_obj(char *pofilename, Psc cur_mod, char *ld_option)
 
48
{
 
49
/*
 
50
    if (static_foreign_libraries(get_name(cur_mod)))
 
51
        return load_obj_sta(cur_mod);
 
52
    else
 
53
 */
 
54
        return load_obj_dyn(pofilename, cur_mod, ld_option);
 
55
}
 
56
 
 
57
/*----------------------------------------------------------------------*/
 
58
 
 
59
#endif /* FOREIGN */