Ignore:
Timestamp:
Jul 16, 2008, 11:52:08 AM (12 years ago)
Author:
Sam Hocevar
Message:
  • zzuf.c: retrieve library object name from libtool's .la file so we don't need to hardcode .so, .sl, .dylib etc. for various platforms.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/zzuf.c

    r2530 r2534  
    906906    int pid, j, len = strlen(opts->oldargv[0]);
    907907#   if defined __APPLE__
    908 #       define FILENAME "libzzuf.dylib"
    909908#       define EXTRAINFO ""
    910909#       define PRELOAD "DYLD_INSERT_LIBRARIES"
    911910    setenv("DYLD_FORCE_FLAT_NAMESPACE", "1", 1);
    912911#   elif defined __osf__
    913 #       define FILENAME "libzzuf.so"
    914912#       define EXTRAINFO ":DEFAULT"
    915913#       define PRELOAD "_RLD_LIST"
    916914#   else
    917 #       define FILENAME "libzzuf.so"
    918915#       define EXTRAINFO ""
    919916#       define PRELOAD "LD_PRELOAD"
     
    978975#if defined HAVE_FORK
    979976    /* Make sure there is space for everything we might do. */
    980     libpath = malloc(len + strlen(LIBDIR "/.libs/" FILENAME EXTRAINFO) + 1);
     977    libpath = malloc(len + strlen(LIBDIR "/.libs/" SONAME EXTRAINFO) + 1);
    981978    strcpy(libpath, opts->oldargv[0]);
    982979
     
    987984    if(tmp)
    988985    {
    989         strcpy(tmp + 1, ".libs/" FILENAME);
     986        strcpy(tmp + 1, ".libs/" SONAME);
    990987        if(access(libpath, R_OK) < 0)
    991             strcpy(libpath, LIBDIR "/" FILENAME);
     988            strcpy(libpath, LIBDIR "/" SONAME);
    992989    }
    993990    else
    994         strcpy(libpath, LIBDIR "/" FILENAME);
     991        strcpy(libpath, LIBDIR "/" SONAME);
    995992
    996993    /* OSF1 only */
Note: See TracChangeset for help on using the changeset viewer.