source: git/libpolys/polys/mod_raw.h @ 57dcd6

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