Merge slimey's Solaris compatibility (with small mods) (bug #2740)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-12-14 23:36:30 +00:00
parent 0f205bb079
commit 9d40b8ee80
55 changed files with 1098 additions and 62 deletions

View File

@@ -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@

View File

@@ -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')

View File

@@ -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 *);