xref: /csrg-svn/lib/libedit/sys.h (revision 61275)
154235Sbostic /*-
2*61275Sbostic  * Copyright (c) 1992, 1993
3*61275Sbostic  *	The Regents of the University of California.  All rights reserved.
454235Sbostic  *
554235Sbostic  * This code is derived from software contributed to Berkeley by
654235Sbostic  * Christos Zoulas of Cornell University.
754235Sbostic  *
854235Sbostic  * %sccs.include.redist.c%
954235Sbostic  *
10*61275Sbostic  *	@(#)sys.h	8.1 (Berkeley) 06/04/93
1154235Sbostic  */
1254235Sbostic 
1354235Sbostic /*
1454235Sbostic  * sys.h: Put all the stupid compiler and system dependencies here...
1554235Sbostic  */
1654235Sbostic #ifndef _h_sys
1754235Sbostic #define _h_sys
1854235Sbostic 
1954235Sbostic #ifndef public
2054235Sbostic # define public		/* Externally visible functions/variables */
2154235Sbostic #endif
2254235Sbostic 
2354235Sbostic #ifndef private
2454235Sbostic # define private	static	/* Always hidden internals */
2554235Sbostic #endif
2654235Sbostic 
2754235Sbostic #ifndef protected
2854235Sbostic # define protected	/* Redefined from elsewhere to "static" */
2954235Sbostic 			/* When we want to hide everything	*/
3054235Sbostic #endif
3154235Sbostic 
3254235Sbostic #include <sys/cdefs.h>
3354235Sbostic 
3454235Sbostic #ifndef _PTR_T
3554235Sbostic # define _PTR_T
3654235Sbostic # if __STDC__
3754235Sbostic typedef void* ptr_t;
3854235Sbostic # else
3954235Sbostic typedef char* ptr_t;
4054235Sbostic # endif
4154235Sbostic #endif
4254235Sbostic 
4354235Sbostic #ifndef _IOCTL_T
4454235Sbostic # define _IOCTL_T
4554235Sbostic # if __STDC__
4654235Sbostic typedef void* ioctl_t;
4754235Sbostic # else
4854235Sbostic typedef char* ioctl_t;
4954235Sbostic # endif
5054235Sbostic #endif
5154235Sbostic 
5254235Sbostic #include <stdio.h>
5354679Schristos #define REGEXP
5454235Sbostic 
5554679Schristos #ifdef SUNOS
5654679Schristos # undef REGEXP
5754679Schristos # include <malloc.h>
5854624Schristos typedef void (*sig_t)__P((int));
5954679Schristos # ifdef __GNUC__
6054624Schristos /*
6154624Schristos  * Broken hdrs.
6254624Schristos  */
6354624Schristos extern char    *getenv		__P((const char *));
6454624Schristos extern int	fprintf		__P((FILE *, const char *, ...));
6554624Schristos extern int	sigsetmask	__P((int));
6654624Schristos extern int	sigblock	__P((int));
6754624Schristos extern int	ioctl		__P((int, int, void *));
6854624Schristos extern int	fputc		__P((int, FILE *));
6954624Schristos extern int	fgetc		__P((FILE *));
7054624Schristos extern int	fflush		__P((FILE *));
7154624Schristos extern int	tolower		__P((int));
7254624Schristos extern int	toupper		__P((int));
7354624Schristos extern int	errno, sys_nerr;
7454624Schristos extern char	*sys_errlist[];
7554624Schristos extern void	perror		__P((const char *));
7654624Schristos extern int	read		__P((int, const char*, int));
7754679Schristos #  include <string.h>
7854679Schristos #  define strerror(e)	sys_errlist[e]
7954679Schristos # endif
8054679Schristos # ifdef SABER
8154624Schristos extern ptr_t    memcpy		__P((ptr_t, const ptr_t, size_t));
8254624Schristos extern ptr_t    memset		__P((ptr_t, int, size_t));
8354679Schristos # endif
8454624Schristos extern char    *fgetline	__P((FILE *, int *));
8554624Schristos #endif
8654624Schristos 
8754235Sbostic #endif /* _h_sys */
88