blob: 31f3fbcc6b3d608dc94d3bff62c47787ff0154f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
diff --git a/GNUmakefile b/GNUmakefile
index a89c697..ece5944 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -31,7 +31,7 @@ CURSES_LIBS= -lcurses
CC= gcc
CFLAGS?= -O2 -pipe
CFLAGS+= -g -Wall
-CPPFLAGS= -DFKEYS -DREGEX -DXKEYS
+CPPFLAGS= -DFKEYS -DXKEYS
CPPFLAGS+= $(BSD_CPPFLAGS) -D__dead=__dead2
LIBS= $(CURSES_LIBS) $(BSD_LIBS)
diff --git a/Makefile b/Makefile
index 023ed17..0c92790 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ DPADD+= ${LIBCURSES} ${LIBUTIL}
# XKEYS -- use termcap function key definitions.
# note: XKEYS and bsmap mode do _not_ get along.
#
-CFLAGS+=-Wall -DFKEYS -DREGEX -DXKEYS
+CFLAGS+=-Wall -DFKEYS -DXKEYS
SRCS= autoexec.c basic.c bell.c buffer.c cinfo.c dir.c display.c \
echo.c extend.c file.c fileio.c funmap.c help.c kbd.c keymap.c \
diff --git a/main.c b/main.c
index 9204d63..dfd4a6a 100644
--- a/main.c
+++ b/main.c
@@ -14,6 +14,10 @@
#include <err.h>
#include <locale.h>
+#ifndef __dead2
+#define __dead2
+#endif
+
int thisflag; /* flags, this command */
int lastflag; /* flags, last command */
int curgoal; /* goal column */
diff --git a/sysdef.h b/sysdef.h
index 8d3d3a2..ea82d73 100644
--- a/sysdef.h
+++ b/sysdef.h
@@ -8,12 +8,7 @@
#include <sys/param.h>
#include <sys/queue.h>
-/* necesarry to get asprintf & friends with glibc XXX doesn't work for some
- * mysterious reason! */
-#ifdef __GLIBC__
-# define _GNU_SOURCE
-# define __USE_GNU
-#endif
+#define _GNU_SOURCE
#if defined(__APPLE__) || defined(__FreeBSD__)
# define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX
@@ -25,10 +20,15 @@
#include <string.h>
#include <errno.h>
#include <signal.h>
+#include <fcntl.h>
#define KBLOCK 8192 /* Kill grow. */
#define GOOD 0 /* Good exit status. */
+#ifndef DEFFILEMODE /* 4.4BSD extension. */
+#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
+#endif
+
typedef int RSIZE; /* Type for file/region sizes */
typedef short KCHAR; /* Type for internal keystrokes */
|