Browse Source

BSD build fix (hopefully)

move more #include to <libowfat/...>
master
Felix von Leitner 1 year ago
parent
commit
43983c9b52
5 changed files with 15 additions and 8 deletions
  1. +4
    -1
      GNUmakefile
  2. +4
    -2
      io.h
  3. +2
    -0
      io/iom_init.c
  4. +3
    -3
      io_internal.h
  5. +2
    -2
      iob.h

+ 4
- 1
GNUmakefile View File

@@ -18,6 +18,9 @@ all: headers ent $(LIBS) libowfat.a libsocket t
pic pie:
$(MAKE) CC="gcc -fPIC" LDFLAGS="-fpie"

picx32 piex32:
$(MAKE) CC="gcc -mx32 -fPIC" LDFLAGS="-fpie"

CROSS=
#CROSS=i686-mingw-
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

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
clean:


+ 4
- 2
io.h View File

@@ -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 */
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>
#else
#include <pthread.h>
@@ -159,7 +161,7 @@ typedef struct iomux {
struct {
int fd, events;
} q[SLOTS];
#ifdef __dietlibc__
#if defined(__MINGW32__) || defined(__dietlibc__)
mtx_t mtx;
cnd_t sem;
#else


+ 2
- 0
io/iom_init.c View File

@@ -6,6 +6,8 @@
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#include <unistd.h>
#include <fcntl.h>
#endif

int iom_init(iomux_t* c) {


+ 3
- 3
io_internal.h View File

@@ -2,9 +2,9 @@
#define my_extern extern
#endif

#include "io.h"
#include "array.h"
#include "iarray.h"
#include "libowfat/io.h"
#include "libowfat/array.h"
#include "libowfat/iarray.h"
#ifdef __MINGW32__
#include "socket.h"
my_extern HANDLE io_comport;


+ 2
- 2
iob.h View File

@@ -13,8 +13,8 @@
* frames as possible. On Linux it will also use the TCP_CORK socket
* option. */

#include "io.h"
#include "array.h"
#include "libowfat/io.h"
#include "libowfat/array.h"

#ifdef __cplusplus
extern "C" {


Loading…
Cancel
Save