BSD build fix (hopefully)
move more #include to <libowfat/...>
This commit is contained in:
parent
dbd1f990c8
commit
97368fbfa6
@ -18,6 +18,9 @@ all: headers ent $(LIBS) libowfat.a libsocket t
|
|||||||
pic pie:
|
pic pie:
|
||||||
$(MAKE) CC="gcc -fPIC" LDFLAGS="-fpie"
|
$(MAKE) CC="gcc -fPIC" LDFLAGS="-fpie"
|
||||||
|
|
||||||
|
picx32 piex32:
|
||||||
|
$(MAKE) CC="gcc -mx32 -fPIC" LDFLAGS="-fpie"
|
||||||
|
|
||||||
CROSS=
|
CROSS=
|
||||||
#CROSS=i686-mingw-
|
#CROSS=i686-mingw-
|
||||||
CC?=gcc
|
CC?=gcc
|
||||||
@ -192,7 +195,7 @@ t.o: t.c fmt.h scan.h str.h uint16.h uint32.h stralloc.h socket.h \
|
|||||||
havesigio.h CAS.h
|
havesigio.h CAS.h
|
||||||
|
|
||||||
t: t.o libowfat.a libsocket
|
t: t.o libowfat.a libsocket
|
||||||
$(DIET) $(CCC) -g -o $@ t.o libowfat.a `cat libsocket` -lpthread
|
$(DIET) $(CCC) -g -o $@ t.o libowfat.a `cat libsocket` -lpthread $(LDFLAGS)
|
||||||
|
|
||||||
.PHONY: all clean tar install rename
|
.PHONY: all clean tar install rename
|
||||||
clean:
|
clean:
|
||||||
|
6
io.h
6
io.h
@ -144,7 +144,9 @@ int64 io_mmapwritefile(int64 out,int64 in,uint64 off,uint64 bytes,io_write_callb
|
|||||||
* aid in debugging the state machine if a descriptor loops or so */
|
* aid in debugging the state machine if a descriptor loops or so */
|
||||||
unsigned int io_debugstring(int64 s,char* buf,unsigned int bufsize);
|
unsigned int io_debugstring(int64 s,char* buf,unsigned int bufsize);
|
||||||
|
|
||||||
#ifdef __dietlibc__
|
#ifdef __MINGW32__
|
||||||
|
#include <mcfgthread/c11thread.h>
|
||||||
|
#elif defined(__dietlibc__)
|
||||||
#include <threads.h>
|
#include <threads.h>
|
||||||
#else
|
#else
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
@ -159,7 +161,7 @@ typedef struct iomux {
|
|||||||
struct {
|
struct {
|
||||||
int fd, events;
|
int fd, events;
|
||||||
} q[SLOTS];
|
} q[SLOTS];
|
||||||
#ifdef __dietlibc__
|
#if defined(__MINGW32__) || defined(__dietlibc__)
|
||||||
mtx_t mtx;
|
mtx_t mtx;
|
||||||
cnd_t sem;
|
cnd_t sem;
|
||||||
#else
|
#else
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/event.h>
|
#include <sys/event.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int iom_init(iomux_t* c) {
|
int iom_init(iomux_t* c) {
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
#define my_extern extern
|
#define my_extern extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "io.h"
|
#include "libowfat/io.h"
|
||||||
#include "array.h"
|
#include "libowfat/array.h"
|
||||||
#include "iarray.h"
|
#include "libowfat/iarray.h"
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
#include "socket.h"
|
#include "socket.h"
|
||||||
my_extern HANDLE io_comport;
|
my_extern HANDLE io_comport;
|
||||||
|
4
iob.h
4
iob.h
@ -13,8 +13,8 @@
|
|||||||
* frames as possible. On Linux it will also use the TCP_CORK socket
|
* frames as possible. On Linux it will also use the TCP_CORK socket
|
||||||
* option. */
|
* option. */
|
||||||
|
|
||||||
#include "io.h"
|
#include "libowfat/io.h"
|
||||||
#include "array.h"
|
#include "libowfat/array.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user