add -D_REENTRANT to CFLAGS so libowfat can be used in multi-threaded

programs
master
leitner 19 years ago
parent 75d75100d8
commit 9512cee614

@ -2,6 +2,8 @@
array_allocate no longer truncates the array array_allocate no longer truncates the array
array_get now not only checks whether the element fits in the array_get now not only checks whether the element fits in the
allocates space, it also needs to be in the initialized space. allocates space, it also needs to be in the initialized space.
add -D_REENTRANT to CFLAGS so libowfat can be used in multi-threaded
programs
0.24: 0.24:
fix scan_to_sa (Tim Lorenz) fix scan_to_sa (Tim Lorenz)

@ -20,6 +20,8 @@ CFLAGS=-pipe -W -Wall -O2 -fomit-frame-pointer
# CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2 # CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2
CFLAGS += -D_REENTRANT
# startrip # startrip
ifneq ($(DEBUG),) ifneq ($(DEBUG),)
CFLAGS=-pipe -Wall -g CFLAGS=-pipe -Wall -g

@ -19,6 +19,8 @@ CC=gcc
CFLAGS=-pipe -W -Wall -O2 -fomit-frame-pointer CFLAGS=-pipe -W -Wall -O2 -fomit-frame-pointer
#CFLAGS=-pipe -Os -march=pentiumpro -mcpu=pentiumpro -fomit-frame-pointer -fschedule-insns2 -Wall #CFLAGS=-pipe -Os -march=pentiumpro -mcpu=pentiumpro -fomit-frame-pointer -fschedule-insns2 -Wall
CFLAGS += -D_REENTRANT
# CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2 # CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2
array_allocate.o: array/array_allocate.c safemult.h uint16.h \ array_allocate.o: array/array_allocate.c safemult.h uint16.h \

@ -2,7 +2,6 @@
#define ARRAY_H #define ARRAY_H
#include "uint64.h" #include "uint64.h"
#include <errno.h>
typedef struct { typedef struct {
char* p; char* p;

@ -88,6 +88,10 @@ int io_fd(int64 d) {
sigprocmask(SIG_BLOCK,&io_ss,0)==0) sigprocmask(SIG_BLOCK,&io_ss,0)==0)
io_waitmode=_SIGIO; io_waitmode=_SIGIO;
} }
#endif
#ifdef __MINGW32__
io_comport=CreateIoCompletionPort(INVALID_HANDLE_VALUE,NULL,0,1);
if (io_comport) io_waitmode=COMPLETIONPORT;
#endif #endif
} }
#if defined(HAVE_SIGIO) #if defined(HAVE_SIGIO)

@ -6,6 +6,7 @@
#include <windows.h> #include <windows.h>
#else #else
#include <sys/mman.h> #include <sys/mman.h>
#include <errno.h>
#endif #endif
#define BUFSIZE 16384 #define BUFSIZE 16384

@ -3,6 +3,7 @@
#include "io_internal.h" #include "io_internal.h"
#include "havebsdsf.h" #include "havebsdsf.h"
#include "havesendfile.h" #include "havesendfile.h"
#include <errno.h>
#if defined(HAVE_BSDSENDFILE) #if defined(HAVE_BSDSENDFILE)
#define SENDFILE 1 #define SENDFILE 1

@ -56,6 +56,9 @@ extern enum __io_waitmode {
#ifdef HAVE_DEVPOLL #ifdef HAVE_DEVPOLL
,DEVPOLL ,DEVPOLL
#endif #endif
#ifdef __MINGW32__
,COMPLETIONPORT
#endif
} io_waitmode; } io_waitmode;
#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) || defined(HAVE_DEVPOLL) #if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) || defined(HAVE_DEVPOLL)

Loading…
Cancel
Save