Skip to content

Commit

Permalink
FIX: warning: implicit declaration of function ‘write’ and 'read'
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Oct 27, 2017
1 parent 4b59d59 commit 3c25db2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
15 changes: 9 additions & 6 deletions make/makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# REBOL Makefile -- Generated by make-make.r (do not edit) on 25-Oct-2017/23:16:40+2:00
# REBOL Makefile -- Generated by make-make.r (do not edit) on 27-Oct-2017/16:34:34+2:00
# This makefile is intentional kept simple to make builds possible on
# a wider range of target platforms.

Expand Down Expand Up @@ -39,13 +39,13 @@ R= $S/core
INCL ?= .
I= -I$(INCL) -I$S/include/

TO_OS?= TO_LINUX
OS_ID?= 0.4.2
TO_OS?= TO_LINUX_X64
OS_ID?= 0.4.40
BIN_SUFFIX=
LIB_SUFFIX= .so
RES=
RAPI_FLAGS= -O2 -fPIC -DENDIAN_LITTLE
HOST_FLAGS= -DREB_EXE -O2 -DENDIAN_LITTLE -D_FILE_OFFSET_BITS=64
RAPI_FLAGS= -O2 -fvisibility=hidden -fPIC -DENDIAN_LITTLE
HOST_FLAGS= -DREB_EXE -O2 -fvisibility=hidden -DENDIAN_LITTLE -D_FILE_OFFSET_BITS=64
RLIB_FLAGS=

# Flags for core and for host:
Expand Down Expand Up @@ -162,7 +162,7 @@ OBJS = objs/a-constants.o objs/a-globals.o objs/a-lib.o objs/b-boot.o \

HOST = objs/host-main.o objs/host-args.o objs/host-device.o objs/host-stdio.o \
objs/dev-net.o objs/dev-dns.o objs/host-lib.o objs/host-readline.o \
objs/dev-stdio.o objs/dev-event.o objs/dev-file.o
objs/dev-stdio.o objs/dev-event.o objs/dev-file.o objs/dev-clipboard.o


# Directly linked r3 executable:
Expand Down Expand Up @@ -506,3 +506,6 @@ objs/dev-event.o: $S/os/posix/dev-event.c
objs/dev-file.o: $S/os/posix/dev-file.c
$(CC) $S/os/posix/dev-file.c $(HFLAGS) -o objs/dev-file.o

objs/dev-clipboard.o: $S/os/posix/dev-clipboard.c
$(CC) $S/os/posix/dev-clipboard.c $(HFLAGS) -o objs/dev-clipboard.o

7 changes: 4 additions & 3 deletions src/os/posix/host-readline.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h> //for read and write

//#define TEST_MODE // teset as stand-alone program

Expand Down Expand Up @@ -75,9 +76,9 @@ enum {

// Macros: (does not use reb-c.h)
#define MAKE_STR(l) (char*)malloc(l)
#define WRITE_CHAR(s) write(1, s, 1)
#define WRITE_CHARS(s,l) write(1, s, l)
#define WRITE_STR(s) write(1, s, strlen(s))
#define WRITE_CHAR(s) if(-1==write(1, s, 1)){}
#define WRITE_CHARS(s,l) if(-1==write(1, s, l)){}
#define WRITE_STR(s) if(-1==write(1, s, strlen(s))){}

#define DBG_INT(t,n) //printf("\r\ndbg[%s]: %d\r\n", t, (n));
#define DBG_STR(t,s) //printf("\r\ndbg[%s]: %s\r\n", t, (s));
Expand Down
1 change: 1 addition & 0 deletions src/tools/file-base.r
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ os-posix: [
dev-stdio.c
dev-event.c
dev-file.c
dev-clipboard.c
]

boot-files: [
Expand Down

0 comments on commit 3c25db2

Please sign in to comment.