61 #define JLI_StrCmp(p1, p2) strcmp((p1), (p2))
62 #define JLI_StrNCmp(p1, p2, p3) strncmp((p1), (p2), (p3))
63 #define JLI_StrCat(p1, p2) strcat((p1), (p2))
64 #define JLI_StrCpy(p1, p2) strcpy((p1), (p2))
65 #define JLI_StrNCpy(p1, p2, p3) strncpy((p1), (p2), (p3))
66 #define JLI_StrStr(p1, p2) strstr((p1), (p2))
67 #define JLI_StrSpn(p1, p2) strspn((p1), (p2))
68 #define JLI_StrCSpn(p1, p2) strcspn((p1), (p2))
69 #define JLI_StrPBrk(p1, p2) strpbrk((p1), (p2))
70 #define JLI_StrTok(p1, p2) strtok((p1), (p2))
71
72 /* On Windows lseek() is in io.h rather than the location dictated by POSIX. */
73 #ifdef _WIN32
74 #include <windows.h>
75 #include <io.h>
76 #include <process.h>
77 #define JLI_StrCaseCmp(p1, p2) stricmp((p1), (p2))
78 #define JLI_StrNCaseCmp(p1, p2, p3) strnicmp((p1), (p2), (p3))
79 int JLI_Snprintf(char *buffer, size_t size, const char *format, ...);
80 void JLI_CmdToArgs(char *cmdline);
81 #define JLI_Lseek _lseeki64
82 #define JLI_PutEnv _putenv
83 #define JLI_GetPid _getpid
84 #else /* NIXES */
85 #include <unistd.h>
86 #include <strings.h>
87 #define JLI_StrCaseCmp(p1, p2) strcasecmp((p1), (p2))
88 #define JLI_StrNCaseCmp(p1, p2, p3) strncasecmp((p1), (p2), (p3))
89 #define JLI_Snprintf snprintf
90 #define JLI_PutEnv putenv
91 #define JLI_GetPid getpid
92 #ifdef __solaris__
93 #define JLI_Lseek llseek
94 #endif
95 #ifdef __linux__
96 #define _LARGFILE64_SOURCE
97 #define JLI_Lseek lseek64
98 #endif
99 #ifdef MACOSX
100 #define JLI_Lseek lseek
|
61 #define JLI_StrCmp(p1, p2) strcmp((p1), (p2))
62 #define JLI_StrNCmp(p1, p2, p3) strncmp((p1), (p2), (p3))
63 #define JLI_StrCat(p1, p2) strcat((p1), (p2))
64 #define JLI_StrCpy(p1, p2) strcpy((p1), (p2))
65 #define JLI_StrNCpy(p1, p2, p3) strncpy((p1), (p2), (p3))
66 #define JLI_StrStr(p1, p2) strstr((p1), (p2))
67 #define JLI_StrSpn(p1, p2) strspn((p1), (p2))
68 #define JLI_StrCSpn(p1, p2) strcspn((p1), (p2))
69 #define JLI_StrPBrk(p1, p2) strpbrk((p1), (p2))
70 #define JLI_StrTok(p1, p2) strtok((p1), (p2))
71
72 /* On Windows lseek() is in io.h rather than the location dictated by POSIX. */
73 #ifdef _WIN32
74 #include <windows.h>
75 #include <io.h>
76 #include <process.h>
77 #define JLI_StrCaseCmp(p1, p2) stricmp((p1), (p2))
78 #define JLI_StrNCaseCmp(p1, p2, p3) strnicmp((p1), (p2), (p3))
79 int JLI_Snprintf(char *buffer, size_t size, const char *format, ...);
80 void JLI_CmdToArgs(char *cmdline);
81 jboolean JLI_DecodeArgs(int *pargc, char*** pargv);
82 #define JLI_Lseek _lseeki64
83 #define JLI_PutEnv _putenv
84 #define JLI_GetPid _getpid
85 #else /* NIXES */
86 #include <unistd.h>
87 #include <strings.h>
88 #define JLI_StrCaseCmp(p1, p2) strcasecmp((p1), (p2))
89 #define JLI_StrNCaseCmp(p1, p2, p3) strncasecmp((p1), (p2), (p3))
90 #define JLI_Snprintf snprintf
91 #define JLI_PutEnv putenv
92 #define JLI_GetPid getpid
93 #ifdef __solaris__
94 #define JLI_Lseek llseek
95 #endif
96 #ifdef __linux__
97 #define _LARGFILE64_SOURCE
98 #define JLI_Lseek lseek64
99 #endif
100 #ifdef MACOSX
101 #define JLI_Lseek lseek
|