Changeset f4399e in git
- Timestamp:
- Dec 14, 2012, 10:55:38 AM (10 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a657104b677b4c461d018cbf3204d72d34ad66a9')
- Children:
- 1d6ec35f323c22dad6c849d92fd276b63460f494
- Parents:
- c1e7a64cbf29c8f08287152a94545e06e8608a9a
- git-author:
- Alexander Dreyer <adreyer@gmx.de>2012-12-14 10:55:38+01:00
- git-committer:
- Alexander Dreyer <adreyer@gmx.de>2012-12-14 15:08:38+01:00
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iplib.cc
rc1e7a6 rf4399e 1079 1079 } 1080 1080 } 1081 if (dynl_check_opened(FullName)) { 1082 if (BVERBOSE(V_LOAD_LIB)) Warn( "%s already loaded", fullname); 1083 return FALSE; 1084 } 1081 1085 if((IDPACKAGE(pl)->handle=dynl_open(FullName))==(void *)NULL) 1082 1086 { … … 1125 1129 1126 1130 pl = IDROOT->get(plib,0); 1127 if (pl==NULL) 1128 { 1129 pl = enterid( plib,0, PACKAGE_CMD, &IDROOT, 1130 TRUE ); 1131 IDPACKAGE(pl)->language = LANG_C; 1132 IDPACKAGE(pl)->libname=omStrDup(newlib); 1133 } 1131 if (pl!=NULL) 1132 { 1133 if (BVERBOSE(V_LOAD_LIB)) Warn( "(builtin) %s already loaded", newlib); 1134 omFree(plib); 1135 return FALSE; 1136 } 1137 1138 pl = enterid( plib,0, PACKAGE_CMD, &IDROOT, 1139 TRUE ); 1140 IDPACKAGE(pl)->language = LANG_C; 1141 IDPACKAGE(pl)->libname=omStrDup(newlib); 1142 1134 1143 IDPACKAGE(pl)->handle=(void *)NULL; 1135 1144 SModulFunctions sModulFunctions; -
libpolys/polys/mod_raw.cc
rc1e7a6 rf4399e 5 5 * ABSTRACT: machine depend code for dynamic modules 6 6 * 7 * Provides: dynl_open() 7 * Provides: dynl_check_opened() 8 * dynl_open() 8 9 * dynl_sym() 9 10 * dynl_error() … … 241 242 242 243 static void* kernel_handle = NULL; 244 int dynl_check_opened( 245 char *filename /* I: filename to check */ 246 ) 247 { 248 return dlopen(filename,RTLD_NOW|RTLD_NOLOAD) != NULL; 249 } 250 243 251 void *dynl_open( 244 252 char *filename /* I: filename to load */ … … 286 294 typedef char *((*func_ptr) ()); 287 295 296 int dynl_check_opened( /* NOTE: untested */ 297 char *filename /* I: filename to check */ 298 ) 299 { 300 struct shl_descriptor *desc; 301 for (int idx = 0; shl_get(idx, &desc) != -1; ++idx) 302 { 303 if (strcmp(filename, desc->filename) == 0) return TRUE; 304 } 305 return FALSE; 306 } 307 288 308 void *dynl_open(char *filename) 289 309 { … … 329 349 #ifndef DL_IMPLEMENTED 330 350 351 int dynl_check_opened(char *filename) 352 { 353 return FALSE; 354 } 355 331 356 void *dynl_open(char *filename) 332 357 { -
libpolys/polys/mod_raw.h
rc1e7a6 rf4399e 1 1 2 #ifndef MOD_RAW_H 2 3 #define MOD_RAW_H … … 7 8 * ABSTRACT: machine depend code for dynamic modules 8 9 * 9 * Provides: dynl_open() 10 * Provides: dynl_check_opened() 11 * dynl_open() 10 12 * dynl_sym() 11 13 * dynl_error() … … 26 28 extern "C" { 27 29 #endif 30 int dynl_check_opened(char* filename); 28 31 void * dynl_open(char *filename); 29 32 // if handle == DYNL_KERNEL_HANDLE, then symbol is searched for … … 47 50 #endif 48 51 49 /// Use @c add(name) to add built-in library to macro 52 /// Data for @c type_of_LIB to determine built-in modules, 53 /// use @c add(name) to add built-in library to macro 50 54 #define SI_FOREACH_BUILTIN(add)\ 51 55 add(huhu)\
Note: See TracChangeset
for help on using the changeset viewer.