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


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

#1 add test code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cf_file.c

    r14 r15  
    2222#endif // #ifdef _WIN32
    2323
     24#define FILE_MODE       S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH
     25
    2426int
    2527CF_File_Open (const char    * path,
    2628              const int     flag)
    2729{
    28     int result = open (path, flag, 0);
     30    int result = open (path, flag);
    2931
    3032    if (result < 0)
     
    3739CF_File_Create (const char * path)
    3840{
    39     int result = open (path, O_CREAT | O_WRONLY | O_TRUNC, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
     41    int result = open (path, CR|WO|TR, FILE_MODE);
    4042
    4143    if (result < 0)
Note: See TracChangeset for help on using the changeset viewer.