os.h
Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 #ifndef __OS_H__
00025 #define __OS_H__
00026 
00027 #ifdef  _MSC_VER
00028 #define HAVE_STRING_H 1
00029 #endif
00030 
00031 #if             _MSC_VER >= 1400
00032 #define _CRT_SECURE_NO_DEPRECATE        1       
00033 #endif
00034 
00035 #include <stdio.h>
00036 #include <pmplib/os_types.h>
00037 
00038 
00039 #if             defined(WIN32)
00040 #define fileno          _fileno
00041 #define strnicmp        _strnicmp
00042 #define snprintf        _snprintf
00043 #define snwprintf       _snwprintf
00044 #define strdup          _strdup
00045 #define getcwd          _getcwd
00046 #define alloca          _alloca
00047 #define strnicmp        _strnicmp
00048 
00049 #define PATHCHAR        '\\'
00050 #define PATHSTR         "\\"
00051 
00052 #else
00053 
00057 #define PATHCHAR        '/'
00058 
00062 #define PATHSTR         "/"
00063 
00064 #endif
00065 
00066 #if             defined(WIN32)
00067 #include <windows.h>
00068 
00069 #elif   defined(bsdi) || defined(FREEBSD) || defined(OPENBSD)
00070 #include <sys/param.h>
00071 #define MAX_PATH        MAXPATHLEN
00072 
00073 #else
00074 #include <limits.h>
00075 #define MAX_PATH        PATH_MAX
00076 
00077 #endif
00078 
00079 #endif