1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 07:16:23 -05:00

uemacs: Compiles on Mac OS X.

Compiles on Mac OS X 10.6.4.

setmode() is renamed to setemode() to avoid conflict with OS X's unistd.h's
setmode().

Modify Makefile to enable the appropriate DEFINES to compile on Mac OS X.

Signed-off-by: Yong Luk Stanley Elijah Goh <stan@t0xt.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Yong Luk Stanley Elijah Goh 2010-08-20 05:55:31 +08:00 committed by Linus Torvalds
parent 834bfd37aa
commit 89fea23de5
6 changed files with 12 additions and 4 deletions

View File

@ -34,6 +34,7 @@ CFLAGS=-O2 $(WARNINGS)
#CFLAGS=-O4 -DSVR4 # Sun
#CFLAGS=-O -qchars=signed # RS/6000
DEFINES=-DAUTOCONF -DPOSIX -DUSG -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600 # Linux
#DEFINES=-DAUTOCONF -DPOSIX -DSYSV -D_DARWIN_C_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE=600 # Mac OS X
#DEFINES=-DAUTOCONF
#LIBS=-ltermcap # BSD
LIBS=-lcurses # SYSV

View File

@ -162,7 +162,7 @@ struct key_tab keytab[NBINDS] = {
,
{CTLX | 'K', killbuffer}
,
{CTLX | 'M', setmode}
{CTLX | 'M', setemode}
,
{CTLX | 'N', filename}
,

View File

@ -107,7 +107,7 @@ extern int indent(int f, int n);
extern int forwdel(int f, int n);
extern int backdel(int f, int n);
extern int killtext(int f, int n);
extern int setmode(int f, int n);
extern int setemode(int f, int n);
extern int delmode(int f, int n);
extern int setgmode(int f, int n);
extern int delgmode(int f, int n);

View File

@ -713,3 +713,10 @@ typedef struct {
char *rstr;
} RMC;
#endif
/* Since Mac OS X's termios.h doesn't have the following 2 macros, define them.
*/
#if defined(SYSV) && defined(_DARWIN_C_SOURCE)
#define OLCUC 0000002
#define XCASE 0000004
#endif

View File

@ -11,7 +11,7 @@
struct name_bind names[] = {
{"abort-command", ctrlg},
{"add-mode", setmode},
{"add-mode", setemode},
{"add-global-mode", setgmode},
#if APROP
{"apropos", apro},

View File

@ -829,7 +829,7 @@ int killtext(int f, int n)
*
* int f, n; default and argument
*/
int setmode(int f, int n)
int setemode(int f, int n)
{
#if PKCODE
return adjustmode(TRUE, FALSE);