/[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 507 by ben.allan, Mon Apr 17 03:18:06 2006 UTC revision 508 by johnpye, Wed Apr 19 04:48:32 2006 UTC
# Line 86  void Init_Slv_Interp(struct Slv_Interp * Line 86  void Init_Slv_Interp(struct Slv_Interp *
86  /*  /*
87      @deprecated, @see packages.h      @deprecated, @see packages.h
88  */  */
89  symchar *MakeArchiveLibraryName(CONST char *prefix)  symchar *MakeArchiveLibraryName(CONST char *prefix){
90  {      char *buffer;
91    char *buffer;      int len;
92    int len;      symchar *result;
   symchar *result;  
93    
94    len = strlen(prefix);      len = strlen(prefix);
95    buffer = (char *)ascmalloc(len+40);      buffer = (char *)ascmalloc(len+40);
96    
97  #ifdef __WIN32__  #if defined(ASC_SHLIBSUFFIX) && defined(ASC_SHLIBPREFIX)
98    sprintf(buffer,"%s.dll",prefix);  # define ASC_STRINGIFY(ARG) #ARG
99  #elif defined(linux)      sprintf(buffer,"%s%s%s",ASC_STRINGIFY(ASC_SHLIBPREFIX),prefix,ASC_STRINGIFY(ASC_SHLIBSUFFIX));
100    sprintf(buffer,"lib%s.so",prefix); /* changed from .o to .so -- JP */  # undef ASC_STRINGIFY
 #elif defined(sun) || defined(solaris)  
   sprintf(buffer,"%s.so.1.0",prefix);  
 #elif defined(__hpux)  
   sprintf(buffer,"%s.sl",prefix);  
 #elif defined(_SGI_SOURCE)  
   sprintf(buffer,"%s.so",prefix);  
101  #else  #else
102    sprintf(buffer,"%s.so.1.0",prefix);  # error "Please #define ASC_SHLIBSUFFIX and ASC_SHLIBPREFIX or pass as compiler flags to packages.c"
103    /*
104    #else
105    # ifdef __WIN32__
106        sprintf(buffer,"%s.dll",prefix);
107    # elif defined(linux)
108        sprintf(buffer,"lib%s.so",prefix); /* changed from .o to .so -- JP *
109    # elif defined(sun) || defined(solaris)
110        sprintf(buffer,"%s.so.1.0",prefix);
111    # elif defined(__hpux)
112        sprintf(buffer,"%s.sl",prefix);
113    # elif defined(_SGI_SOURCE)
114        sprintf(buffer,"%s.so",prefix);
115    # else
116        sprintf(buffer,"%s.so.1.0",prefix);
117    # endif
118    */
119  #endif  #endif
120    
121    result = AddSymbol(buffer); /* the main symbol table */      result = AddSymbol(buffer); /* the main symbol table */
122    ascfree(buffer);      ascfree(buffer);
123    return result;              /* owns the string */      return result;              /* owns the string */
124  }  }
125    
126  /*---------------------------------------------  /*---------------------------------------------

Legend:
Removed from v.507  
changed lines
  Added in v.508

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