@@ -315,6 +315,7 @@ extern void pgwin32_unsetenv(const char *);
315
315
316
316
/* Things that exist in MingW headers, but need to be added to MSVC & BCC */
317
317
#ifdef WIN32_ONLY_COMPILER
318
+
318
319
#ifndef _WIN64
319
320
typedef long ssize_t ;
320
321
#else
@@ -323,24 +324,15 @@ typedef __int64 ssize_t;
323
324
324
325
#ifndef __BORLANDC__
325
326
typedef unsigned short mode_t ;
326
- #endif
327
327
328
- #ifndef __BORLANDC__
329
328
#define S_IRUSR _S_IREAD
330
329
#define S_IWUSR _S_IWRITE
331
330
#define S_IXUSR _S_IEXEC
332
331
#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
333
- #define S_IRGRP 0
334
- #define S_IWGRP 0
335
- #define S_IXGRP 0
336
- #define S_IRWXG 0
337
- #define S_IROTH 0
338
- #define S_IWOTH 0
339
- #define S_IXOTH 0
340
- #define S_IRWXO 0
332
+ /* see also S_IRGRP etc below */
341
333
#define S_ISDIR (m ) (((m) & S_IFMT) == S_IFDIR)
342
334
#define S_ISREG (m ) (((m) & S_IFMT) == S_IFREG)
343
- #endif
335
+ #endif /* __BORLANDC__ */
344
336
345
337
#define F_OK 0
346
338
#define W_OK 2
@@ -363,10 +355,22 @@ typedef unsigned short mode_t;
363
355
#ifndef O_RANDOM
364
356
#define O_RANDOM 0x0010 /* File access is primarily random */
365
357
#define O_SEQUENTIAL 0x0020 /* File access is primarily sequential */
366
- #define O_TEMPORARY 0x0040 /* Temporary file bit */
358
+ #define O_TEMPORARY 0x0040 /* Temporary file bit */
367
359
#define O_SHORT_LIVED 0x1000 /* Temporary storage file, try not to flush */
368
360
#define _O_SHORT_LIVED O_SHORT_LIVED
369
361
#endif /* ifndef O_RANDOM */
370
362
#endif /* __BORLANDC__ */
371
363
372
- #endif
364
+ #endif /* WIN32_ONLY_COMPILER */
365
+
366
+ /* These aren't provided by either MingW or MSVC */
367
+ #ifndef __BORLANDC__
368
+ #define S_IRGRP 0
369
+ #define S_IWGRP 0
370
+ #define S_IXGRP 0
371
+ #define S_IRWXG 0
372
+ #define S_IROTH 0
373
+ #define S_IWOTH 0
374
+ #define S_IXOTH 0
375
+ #define S_IRWXO 0
376
+ #endif /* __BORLANDC__ */
0 commit comments