Ignore:
Timestamp:
Jan 7, 2010, 4:12:19 PM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Fix for hardcoded \lib directory in 3.0.x

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/dynconfig.c

    r169 r363  
    139139 * @sa lib_path() to get the path to a file inside the LIBDIR.
    140140 **/
    141 pstring dyn_LIBDIR = LIBDIR;
     141// we try to set the libdir based on the current running process
     142const char* getlibdir()
     143{
     144        static pstring buffer = "";
     145        if (!*buffer)
     146        {
     147
     148                if (getenv("SMB_EXE") == NULL)
     149                {
     150                        snprintf(buffer, 260, "%s", LIBDIR);
     151                } else {
     152                        snprintf(buffer, 260, "%s/lib", getenv("SMB_EXE"));
     153                }
     154        }
     155
     156        return buffer;
     157}
     158
    142159fstring dyn_SHLIBEXT = SHLIBEXT;
    143160
Note: See TracChangeset for help on using the changeset viewer.