#include "globaldefs.h"
-#if GDEF_OS_LINUX || GDEF_OS_MACOS
- #define Q_UNIX
-#endif
-
-#ifdef Q_UNIX
+#if !GDEF_OS_WINDOWS
#include <unistd.h>
#include <pwd.h>
#include <limits.h>
-#endif
-
+#endif // !GDEF_OS_WINDOWS
/* dependencies */
#include "cmdlib.h"
#include "inout.h"
-
-
/* path support */
#define MAX_BASE_PATHS 10
#define MAX_GAME_PATHS 10
*/
char *LokiGetHomeDir( void ){
- #ifndef Q_UNIX
+ #if GDEF_OS_WINDOWS
return NULL;
- #else
+ #else // !GDEF_OS_WINDOWS
char *home;
uid_t id;
struct passwd *pwd;
/* return it */
return home;
- #endif
+ #endif // !GDEF_OS_WINDOWS
}
*/
void LokiInitPaths( char *argv0 ){
- #ifndef Q_UNIX
+ #if GDEF_OS_WINDOWS
/* this is kinda crap, but hey */
strcpy( installPath, "../" );
- #else
+ #else // !GDEF_OS_WINDOWS
char temp[ MAX_OS_PATH ];
char *home;
char *path;
/* set home path */
homePath = home;
- #endif
+ #endif // !GDEF_OS_WINDOWS
}
*/
void AddHomeBasePath( char *path ){
- #ifdef Q_UNIX
+ #if !GDEF_OS_WINDOWS
int i;
char temp[ MAX_OS_PATH ];
strcpy( basePaths[ 0 ], temp );
CleanPath( basePaths[ 0 ] );
numBasePaths++;
- #endif
+ #endif // !GDEF_OS_WINDOWS
}