]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use the right #define flags for permissions on open.
authorMichael Jerris <mike@jerris.com>
Tue, 23 Jan 2007 02:54:20 +0000 (02:54 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 23 Jan 2007 02:54:20 +0000 (02:54 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4029 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_xml.c

index d179550e5ccdefc796e45dd36416910f8a332675..0891aa1740bc641a77263fbaf138874c5f4995ec 100644 (file)
 #ifdef HAVE_MMAP
 #include <sys/mman.h>
 #endif
+#ifdef WIN32
+#ifndef S_IRUSR
+#define S_IRUSR _S_IREAD
+#endif
+#ifndef S_IWUSR
+#define S_IWUSR _S_IWRITE
+#endif
+#endif
 
 #define SWITCH_XML_WS   "\t\r\n "  // whitespace
 #define SWITCH_XML_ERRL 128        // maximum error string length
@@ -860,7 +868,7 @@ static int preprocess(const char *file, int new_fd, int rlevel)
             goto done;
         }
 
-        if ((new_fd = open(new_file, O_WRONLY | O_CREAT | O_TRUNC, 700)) < 0) {
+               if ((new_fd = open(new_file, O_WRONLY | O_CREAT | O_TRUNC,  S_IRUSR | S_IWUSR)) < 0) {
             goto done;
         }
         close_fd = new_fd;