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

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

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

revision 865 by johnpye, Thu Sep 28 14:19:17 2006 UTC revision 866 by johnpye, Fri Sep 29 06:22:21 2006 UTC
# Line 109  char *importhandler_extlib_filename(cons Line 109  char *importhandler_extlib_filename(cons
109          system-specific stuff here, but it's not as general.          system-specific stuff here, but it's not as general.
110      */      */
111  # ifdef __WIN32__  # ifdef __WIN32__
112      snprintf(buffer,PATH_MAX,"%s.dll",partialname1);      snprintf(buffer,PATH_MAX,"%s.dll",partialname);
113  # elif defined(linux)  # elif defined(linux)
114      snprintf(buffer,PATH_MAX,"lib%s.so",partialname); /* changed from .o to .so -- JP */      snprintf(buffer,PATH_MAX,"lib%s.so",partialname); /* changed from .o to .so -- JP */
115  # elif defined(sun) || defined(solaris)  # elif defined(sun) || defined(solaris)
# Line 122  char *importhandler_extlib_filename(cons Line 122  char *importhandler_extlib_filename(cons
122  #  error "Unknown system type (please define ASC_SHLIBSUFFIX and ASC_SHLIBPREFIX)"  #  error "Unknown system type (please define ASC_SHLIBSUFFIX and ASC_SHLIBPREFIX)"
123  # endif  # endif
124  #endif  #endif
125        
126      return buffer;      return buffer;
127  }  }
128    
# Line 174  int importhandler_extlib_import(const st Line 174  int importhandler_extlib_import(const st
174      }      }
175    
176      ASC_FREE(path);      ASC_FREE(path);
177      return result;        return result;
178  }  }
179    
180  /*------------------------------------------------------------------------------  /*------------------------------------------------------------------------------
# Line 203  int importhandler_createlibrary(){ Line 203  int importhandler_createlibrary(){
203          ERROR_REPORTER_HERE(ASC_PROG_ERR,"Failed to create 'extlib' import handler");          ERROR_REPORTER_HERE(ASC_PROG_ERR,"Failed to create 'extlib' import handler");
204          return 1;          return 1;
205      }      }
206        
207      return 0;      return 0;
208  }  }
209    
# Line 255  FilePathTestFn importhandler_search_test Line 255  FilePathTestFn importhandler_search_test
255    
256  /**  /**
257      A FilePath 'test' function for passing to the ospath_searchpath_iterate function.      A FilePath 'test' function for passing to the ospath_searchpath_iterate function.
258      This test function will return a match when an importable file having the      This test function will return a match when an importable file having the
259      required name is present in the fully resolved path.      required name is present in the fully resolved path.
260    
261      @param path the search path component      @param path the search path component
# Line 350  struct FilePath *importhandler_findinpat Line 350  struct FilePath *importhandler_findinpat
350          ospath_free(fp1);          ospath_free(fp1);
351          return NULL;          return NULL;
352      }      }
353        
354    
355      searchdata.relativedir = ospath_getdir(fp1);      searchdata.relativedir = ospath_getdir(fp1);
356      if(searchdata.relativedir ==NULL){      if(searchdata.relativedir ==NULL){
# Line 377  struct FilePath *importhandler_findinpat Line 377  struct FilePath *importhandler_findinpat
377    
378      if(NULL==ospath_searchpath_iterate(sp,&importhandler_search_test,&searchdata)){      if(NULL==ospath_searchpath_iterate(sp,&importhandler_search_test,&searchdata)){
379          ospath_free(searchdata.relativedir);          ospath_free(searchdata.relativedir);
380          ASC_FREE(searchdata.partialname);                ASC_FREE(searchdata.partialname);
381          ospath_searchpath_free(sp);          ospath_searchpath_free(sp);
382          return NULL;          return NULL;
383      }      }

Legend:
Removed from v.865  
changed lines
  Added in v.866

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