comparison create.cpp @ 595:31a1556fc2d6

Make dump.cpp not use mmap() A couple more "handy" portability macros in audioDB-internals.h means the balance of this work adds lines of code; clearly suboptimal.
author mas01cr
date Tue, 11 Aug 2009 21:42:44 +0000
parents 0242e5d1643c
children 6ad0a6e67d4c
comparison
equal deleted inserted replaced
594:c850f3433454 595:31a1556fc2d6
44 } 44 }
45 if(datadim == 0) { 45 if(datadim == 0) {
46 datadim = ADB_DEFAULT_DATADIM; 46 datadim = ADB_DEFAULT_DATADIM;
47 } 47 }
48 48
49 if ((fd = open(path, O_RDWR|O_CREAT|O_EXCL, 49 if ((fd = open(path, O_RDWR|O_CREAT|O_EXCL, ADB_CREAT_PERMISSIONS)) < 0) {
50 #if defined(WIN32)
51 _S_IREAD|_S_IWRITE
52 #else
53 S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH
54 #endif
55 )) < 0) {
56 goto error; 50 goto error;
57 } 51 }
58 52
59 header = (adb_header_t *) malloc(sizeof(adb_header_t)); 53 header = (adb_header_t *) malloc(sizeof(adb_header_t));
60 if(!header) { 54 if(!header) {