Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5132ad8

Browse files
committed
Make S_IRGRP etc available in mingw builds as well as MSVC.
(Hm, I wonder whether BCC defines them either...)Also label dangling endifs a bit better in this area.
1 parent3864afa commit5132ad8

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

‎src/include/port/win32.h

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ extern void pgwin32_unsetenv(const char *);
315315

316316
/* Things that exist in MingW headers, but need to be added to MSVC & BCC */
317317
#ifdefWIN32_ONLY_COMPILER
318+
318319
#ifndef_WIN64
319320
typedeflongssize_t;
320321
#else
@@ -323,24 +324,15 @@ typedef __int64 ssize_t;
323324

324325
#ifndef__BORLANDC__
325326
typedefunsigned shortmode_t;
326-
#endif
327327

328-
#ifndef__BORLANDC__
329328
#defineS_IRUSR _S_IREAD
330329
#defineS_IWUSR _S_IWRITE
331330
#defineS_IXUSR _S_IEXEC
332331
#defineS_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
333-
#defineS_IRGRP 0
334-
#defineS_IWGRP 0
335-
#defineS_IXGRP 0
336-
#defineS_IRWXG 0
337-
#defineS_IROTH 0
338-
#defineS_IWOTH 0
339-
#defineS_IXOTH 0
340-
#defineS_IRWXO 0
332+
/* see also S_IRGRP etc below */
341333
#defineS_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
342334
#defineS_ISREG(m) (((m) & S_IFMT) == S_IFREG)
343-
#endif
335+
#endif/* __BORLANDC__ */
344336

345337
#defineF_OK 0
346338
#defineW_OK 2
@@ -363,10 +355,22 @@ typedef unsigned short mode_t;
363355
#ifndefO_RANDOM
364356
#defineO_RANDOM0x0010/* File access is primarily random */
365357
#defineO_SEQUENTIAL0x0020/* File access is primarily sequential */
366-
#defineO_TEMPORARY 0x0040/* Temporary file bit */
358+
#defineO_TEMPORARY0x0040/* Temporary file bit */
367359
#defineO_SHORT_LIVED0x1000/* Temporary storage file, try not to flush */
368360
#define_O_SHORT_LIVEDO_SHORT_LIVED
369361
#endif/* ifndef O_RANDOM */
370362
#endif/* __BORLANDC__ */
371363

372-
#endif
364+
#endif/* WIN32_ONLY_COMPILER */
365+
366+
/* These aren't provided by either MingW or MSVC */
367+
#ifndef__BORLANDC__
368+
#defineS_IRGRP 0
369+
#defineS_IWGRP 0
370+
#defineS_IXGRP 0
371+
#defineS_IRWXG 0
372+
#defineS_IROTH 0
373+
#defineS_IWOTH 0
374+
#defineS_IXOTH 0
375+
#defineS_IRWXO 0
376+
#endif/* __BORLANDC__ */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp