Skip to contentSkip to conversation

status.c patch

Openvpn-devel Gisle Vanem 2 participants 2 messages Dec 13, 2004

lore
Share & tools
lore
#0 lore raw

It looked rather suspicious to want (S_IRUSR | S_IWUSR) for MingW when opening files in status.c. Patch:

status.c Mon Dec 13 14:44:17 2004 renamed from status.c.orig Wed Dec 08 00:52:04 2004 +1 -1
@@ -77,7 +77,7 @@
       {
         switch (so->flags)
           {
-#ifdef _MSC_VER
+#ifdef WIN32
            case STATUS_OUTPUT_WRITE:
              so->fd = open (filename,
                             O_CREAT | O_TRUNC | O_WRONLY,

--gv

#1 lore raw
Quoted 6 lines · Gisle Vanem

It looked rather suspicious to want (S_IRUSR | S_IWUSR) for MingW when opening files in status.c. Patch:

status.c Mon Dec 13 14:44:17 2004 line 83

Quoted 8 lines
status.c Mon Dec 13 14:44:17 2004 renamed from status.c.orig Wed Dec 08 00:52:04 2004 +1 -1
@@ -77,7 +77,7 @@
        {
          switch (so->flags)
            {
-#ifdef _MSC_VER
+#ifdef WIN32
             case STATUS_OUTPUT_WRITE:
               so->fd = open (filename,
                              O_CREAT | O_TRUNC | O_WRONLY,

It's not strictly necessary, since MinGW has:

sh-2.04$ grep -Er '_S_IRUSR|_S_IWUSR' .

./sys/stat.h:#define    _S_IWUSR        _S_IWRITE
./sys/stat.h:#define    _S_IRUSR        _S_IREAD
./sys/stat.h:#define    S_IWUSR         _S_IWUSR
./sys/stat.h:#define    S_IRUSR         _S_IRUSR

James