source: git/libpolys/polys/mod_raw.h @ 9d68fd

spielwiese
Last change on this file since 9d68fd was f4399e, checked in by Alexander Dreyer <adreyer@…>, 11 years ago
fix: reloading of modules (multiply calling LIB("file.so")) is ignored add: dynl_check_opened newly introduced
  • Property mode set to 100644
File size: 1.4 KB
Line 
1
2#ifndef MOD_RAW_H
3#define MOD_RAW_H
4/****************************************
5*  Computer Algebra System SINGULAR     *
6****************************************/
7/*
8 * ABSTRACT: machine depend code for dynamic modules
9 *
10 * Provides: dynl_check_opened()
11 *           dynl_open()
12 *           dynl_sym()
13 *           dynl_error()
14 *           dunl_close()
15*/
16
17typedef enum { LT_NONE, LT_NOTFOUND, LT_SINGULAR, LT_ELF, LT_HPUX, LT_MACH_O, LT_BUILTIN} lib_types;
18
19lib_types type_of_LIB(char *newlib, char *fullname);
20
21#if defined(HAVE_DL)
22#ifdef __cplusplus
23void* dynl_open_binary_warn(const char* binary_name, const char* msg = NULL );
24void* dynl_sym_warn(void* handle, const char* proc, const char* msg = NULL );
25#endif
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30int          dynl_check_opened(char* filename);
31void *       dynl_open(char *filename);
32// if handle == DYNL_KERNEL_HANDLE, then symbol is searched for
33// in kernel of program
34#define DYNL_KERNEL_HANDLE ((void*) 0x1)
35void *       dynl_sym(void *handle, const char *symbol);
36int          dynl_close (void *handle);
37const char * dynl_error();
38
39#ifdef __cplusplus
40}
41#endif
42
43#endif /* HAVE_DL */
44
45
46#ifdef EMBED_PYTHON
47#define SI_BUILTIN_PYOBJECT(add) add(pyobject)
48#else
49#define SI_BUILTIN_PYOBJECT(add)
50#endif
51
52/// Data for @c type_of_LIB to determine built-in modules,
53/// use @c add(name) to add built-in library to macro
54#define SI_FOREACH_BUILTIN(add)\
55  add(huhu)\
56  SI_BUILTIN_PYOBJECT(add)
57
58
59#endif /* MOD_RAW_H */
Note: See TracBrowser for help on using the repository browser.