Changeset 2263


Ignore:
Timestamp:
Jan 22, 2013, 10:32:51 PM (7 years ago)
Author:
sam
Message:

build: check for getcwd() and _getcwd() and configure time.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r2262 r2263  
    8080AC_CHECK_HEADERS(security/pam_appl.h security/pam_misc.h)
    8181AC_CHECK_HEADERS(pam/pam_appl.h pam/pam_misc.h)
     82
     83AC_CHECK_FUNCS(getcwd _getcwd)
    8284
    8385if test "${enable_debug}" = "yes"; then
  • trunk/src/sys/init.cpp

    r2262 r2263  
    3939          String const projectdir, String const solutiondir)
    4040{
     41    using namespace std;
     42
    4143    /*
    4244     * Retrieve binary directory, defaulting to current dir.
    4345     */
    4446
    45 #if defined _WIN32
     47#if defined HAVE_GETCWD
     48    char *cwd = getcwd(NULL, 0);
     49#elif defined HAVE__GETCWD || (defined _WIN32 && !defined _XBOX)
    4650    char *cwd = _getcwd(NULL, 0);
    4751#else
    48     char *cwd = getcwd(NULL, 0);
     52    char *cwd = NULL;
    4953#endif
    5054    String binarydir = String(cwd ? cwd : ".") + SEPARATOR;
Note: See TracChangeset for help on using the changeset viewer.