2003-09-08 17:43:02 +00:00
|
|
|
#define _FILE_OFFSET_BITS 64
|
2003-09-02 00:14:04 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include "io_internal.h"
|
|
|
|
|
|
|
|
int io_createfile(int64* d,const char* s) {
|
|
|
|
long fd=open(s,O_WRONLY|O_CREAT|O_TRUNC,0600);
|
|
|
|
if (fd != -1) {
|
2003-09-08 20:29:39 +00:00
|
|
|
*d=fd;
|
|
|
|
return 1;
|
2003-09-02 00:14:04 +00:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|