/[ascend]/trunk/base/generic/compiler/packages.c
ViewVC logotype

Diff of /trunk/base/generic/compiler/packages.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 380 by johnpye, Sat Mar 18 07:29:48 2006 UTC revision 381 by johnpye, Sun Mar 19 23:01:39 2006 UTC
# Line 34  Line 34 
34      required.      required.
35  */  */
36    
37    #ifndef DYNAMIC_PACKAGES
38    # error "WHERE IS THE DYNAMICS PACKAGES #DEF?!"
39    #endif
40    
41  #include <math.h>  #include <math.h>
42  #include <ctype.h>  /* was compiler/actype.h */  #include <ctype.h>  /* was compiler/actype.h */
43  #include "utilities/ascConfig.h"  #include "utilities/ascConfig.h"
# Line 92  symchar *MakeArchiveLibraryName(CONST ch Line 96  symchar *MakeArchiveLibraryName(CONST ch
96    len = strlen(prefix);    len = strlen(prefix);
97    buffer = (char *)ascmalloc(len+40);    buffer = (char *)ascmalloc(len+40);
98    
99  #if defined(sun) || defined(solaris)  #ifdef __WIN32__
100      sprintf(buffer,"%s.dll",prefix);
101    #elif defined(linux)
102      sprintf(buffer,"lib%s.so",prefix); /* changed from .o to .so -- JP */
103    #elif defined(sun) || defined(solaris)
104    sprintf(buffer,"%s.so.1.0",prefix);    sprintf(buffer,"%s.so.1.0",prefix);
105  #elif defined(__hpux)  #elif defined(__hpux)
106    sprintf(buffer,"%s.sl",prefix);    sprintf(buffer,"%s.sl",prefix);
107  #elif defined(_SGI_SOURCE)  #elif defined(_SGI_SOURCE)
108    sprintf(buffer,"%s.so",prefix);    sprintf(buffer,"%s.so",prefix);
 #elif defined(linux)  
   sprintf(buffer,"lib%s.so",prefix); /* changed from .o to .so -- JP */  
109  #else  #else
110    sprintf(buffer,"%s.so.1.0",prefix);    sprintf(buffer,"%s.so.1.0",prefix);
111  #endif  #endif
# Line 229  int LoadArchiveLibrary(CONST char *name, Line 235  int LoadArchiveLibrary(CONST char *name,
235    if(initfunc==NULL){    if(initfunc==NULL){
236      CONSOLE_DEBUG("GENERATING NAME OF INITFUNC");      CONSOLE_DEBUG("GENERATING NAME OF INITFUNC");
237      CONSOLE_DEBUG("NAME STEM = %s",name);      CONSOLE_DEBUG("NAME STEM = %s",name);
238      strcpy(name,initfunc_generated_name);      sprintf(initfunc_generated_name,"%s",name);
239      strcat(initfunc_generated_name,"_register");      strcat(initfunc_generated_name,"_register");
240        CONSOLE_DEBUG("GENERATED NAME = %s",initfunc_generated_name);
241      result = Asc_DynamicLoad(full_file_name,initfunc_generated_name);      result = Asc_DynamicLoad(full_file_name,initfunc_generated_name);
242    }else{    }else{
243      result = Asc_DynamicLoad(full_file_name,initfunc);      result = Asc_DynamicLoad(full_file_name,initfunc);
# Line 239  int LoadArchiveLibrary(CONST char *name, Line 246  int LoadArchiveLibrary(CONST char *name,
246    if (result) {    if (result) {
247      return 1;      return 1;
248    }    }
249    ERROR_REPORTER_DEBUG("Successfully ran '%s' from dynamic package '%s'\n",initfunc,name);    if(initfunc==NULL){
250        ERROR_REPORTER_DEBUG("Successfully ran '%s' from dynamic package '%s'\n",initfunc_generated_name,name);
251      }else{
252        ERROR_REPORTER_DEBUG("Successfully ran '%s' from dynamic package '%s'\n",initfunc,name);
253      }
254    return 0;    return 0;
255    
256  #elif defined(STATIC_PACKAGES)  #elif defined(STATIC_PACKAGES)

Legend:
Removed from v.380  
changed lines
  Added in v.381

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22