Changeset 14 in libcf for trunk/src/cf_file.c


Ignore:
Timestamp:
01/31/13 22:55:37 (11 years ago)
Author:
cheese
Message:

#1 add test code and fix debug and logging error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_file.c

    r5 r14  
    55
    66#ifdef _WIN32
     7# include <stdio.h>
    78# include <io.h>
    8 # include <stdio.h>
     9# include <sys/stat.h>
     10
     11# define S_IWUSR        _S_IWRITE
     12# define S_IRUSR        _S_IREAD
     13# define S_IXUSR        _S_IEXEC
     14# define S_IRGRP        0x00000000
     15# define S_IWGRP        0x00000000
     16# define S_IXGRP        0x00000000
     17# define S_IROTH        0x00000000
     18# define S_IWOTH        0x00000000
     19# define S_IXOTH        0x00000000
    920#else // #ifdef _WIN32
    1021# include <unistd.h>
     
    2637CF_File_Create (const char * path)
    2738{
    28     int result = open (path, O_CREAT | O_WRONLY | O_TRUNC, 0);
     39    int result = open (path, O_CREAT | O_WRONLY | O_TRUNC, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
    2940
    3041    if (result < 0)
Note: See TracChangeset for help on using the changeset viewer.