linux fixes
authorteodor <teodor>
Sun, 6 Feb 2005 14:39:37 +0000 (14:39 +0000)
committerteodor <teodor>
Sun, 6 Feb 2005 14:39:37 +0000 (14:39 +0000)
Makefile
flatdb.c

index 25796a9..c0c9404 100644 (file)
--- 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 \
index 10e1a00..56d78eb 100644 (file)
--- 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;