From: teodor Date: Sun, 6 Feb 2005 14:39:37 +0000 (+0000) Subject: linux fixes X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=bcb3b8d5f80af41526275f03f6cbaac08fb97c21;p=tedtools.git linux fixes --- diff --git a/Makefile b/Makefile index 25796a9..c0c9404 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,8 @@ RANLIB=ranlib LD=ld -x -shared INCLUDE=-I. -CFLAGS=-Wall -g -O2 -pedantic -ansi -DASSERT_CORE -D_GNU_SOURCE -DHAVE_POLL_H -DHAVE_SYS_POLL_H -DHAVE_HSTRERROR +#LINUX_CFLAGS=-D_GNU_SOURCE -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 +CFLAGS=-Wall -g -O2 -pedantic -ansi -DASSERT_CORE -DHAVE_POLL_H -DHAVE_SYS_POLL_H -DHAVE_HSTRERROR $(LINUX_CFLAGS) LIB=-g -L. -ltedtools -lm OBJS=tlog.o tmalloc.o tools.o prs_hmap.o sfxstr.o \ diff --git a/flatdb.c b/flatdb.c index 10e1a00..56d78eb 100644 --- a/flatdb.c +++ b/flatdb.c @@ -126,7 +126,7 @@ FDBOpen(FDB *db, char *file, int readonly) { return FDB_ERROR; } } else { - db->fd = open(file, O_CREAT | O_RDWR); + db->fd = open(file, O_CREAT | O_RDWR, 0666); if ( db->fd < 0 ) { tlog(TL_CRIT,"FDBOpen: open failed: %s",strerror(errno)); return FDB_ERROR;