diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-14 23:36:30 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-12-14 23:36:30 +0000 |
commit | 70cedacdde512d2ed5984eec242c55f3239b73fc (patch) | |
tree | 48694f38698e4ead3840305333816193c7fcd8a0 /editline | |
parent | c60f8a2b8e1551244e674baff85cb1a4f2d5fd5b (diff) |
Merge slimey's Solaris compatibility (with small mods) (bug #2740)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4446 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'editline')
-rwxr-xr-x | editline/Makefile.in | 6 | ||||
-rwxr-xr-x | editline/np/vis.c | 4 | ||||
-rwxr-xr-x | editline/sys.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/editline/Makefile.in b/editline/Makefile.in index a18efd780..67ae6ad40 100755 --- a/editline/Makefile.in +++ b/editline/Makefile.in @@ -2,6 +2,8 @@ # Generic Makefile for libedit. # +OSTYPE=$(shell uname -s) + SHELL = /bin/sh CC = @CC@ @@ -18,6 +20,10 @@ LIBS = @LIBS@ INSTALL = @INSTALL@ PREFIX = @prefix@ +ifeq ($(OSTYPE),SunOS) +CFLAGS+=-DSOLARIS -I../include/solaris-compat +endif + # .c files. ACSRCS = @ACSRCS@ BCSRCS = @BCSRCS@ diff --git a/editline/np/vis.c b/editline/np/vis.c index 259f03bd6..97406cdf8 100755 --- a/editline/np/vis.c +++ b/editline/np/vis.c @@ -67,6 +67,10 @@ __weak_alias(vis,_vis) #define BELL '\007' #endif +#ifdef SOLARIS +typedef unsigned int u_int32_t; +#endif + #define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7') #define iswhite(c) (c == ' ' || c == '\t' || c == '\n') #define issafe(c) (c == '\b' || c == BELL || c == '\r') diff --git a/editline/sys.h b/editline/sys.h index 9970f18f8..a306d1df7 100755 --- a/editline/sys.h +++ b/editline/sys.h @@ -96,10 +96,12 @@ typedef void (*sig_t)(int); /* * Broken hdrs. */ +#ifndef SOLARIS extern int tgetent(const char *bp, char *name); extern int tgetflag(const char *id); extern int tgetnum(const char *id); extern char *tgetstr(const char *id, char **area); +#endif extern char *tgoto(const char *cap, int col, int row); extern int tputs(const char *str, int affcnt, int (*putc)(int)); extern char *getenv(const char *); |