Deleted Added
full compact
sys.h (26926) sys.h (84260)
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Christos Zoulas of Cornell University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)sys.h 8.1 (Berkeley) 6/4/93
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Christos Zoulas of Cornell University.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)sys.h 8.1 (Berkeley) 6/4/93
37 * $NetBSD: sys.h,v 1.3 1997/01/11 06:48:12 lukem Exp $
38 * $FreeBSD: head/lib/libedit/sys.h 84260 2001-10-01 08:41:27Z obrien $
37 */
38
39/*
40 * sys.h: Put all the stupid compiler and system dependencies here...
41 */
42#ifndef _h_sys
39 */
40
41/*
42 * sys.h: Put all the stupid compiler and system dependencies here...
43 */
44#ifndef _h_sys
43#define _h_sys
45#define _h_sys
44
45#ifndef public
46# define public /* Externally visible functions/variables */
47#endif
48
49#ifndef private
50# define private static /* Always hidden internals */
51#endif
52
53#ifndef protected
54# define protected /* Redefined from elsewhere to "static" */
55 /* When we want to hide everything */
56#endif
57
58#include <sys/cdefs.h>
59
60#ifndef _PTR_T
61# define _PTR_T
46
47#ifndef public
48# define public /* Externally visible functions/variables */
49#endif
50
51#ifndef private
52# define private static /* Always hidden internals */
53#endif
54
55#ifndef protected
56# define protected /* Redefined from elsewhere to "static" */
57 /* When we want to hide everything */
58#endif
59
60#include <sys/cdefs.h>
61
62#ifndef _PTR_T
63# define _PTR_T
62# if __STDC__
63typedef void* ptr_t;
64# else
65typedef char* ptr_t;
66# endif
64typedef void *ptr_t;
67#endif
68
69#ifndef _IOCTL_T
70# define _IOCTL_T
65#endif
66
67#ifndef _IOCTL_T
68# define _IOCTL_T
71# if __STDC__
72typedef void* ioctl_t;
73# else
74typedef char* ioctl_t;
75# endif
69typedef void *ioctl_t;
76#endif
77
78#include <stdio.h>
70#endif
71
72#include <stdio.h>
79#define REGEX /* Use POSIX.2 regular expression functions */
80#undef REGEXP /* Use UNIX V8 regular expression functions */
81
73
74#define REGEX /* Use POSIX.2 regular expression functions */
75#undef REGEXP /* Use UNIX V8 regular expression functions */
76
82#ifdef SUNOS
83# undef REGEX
84# undef REGEXP
85# include <malloc.h>
77#ifdef SUNOS
78# undef REGEX
79# undef REGEXP
80# include <malloc.h>
86typedef void (*sig_t)__P((int));
81typedef void (*sig_t)(int);
87# ifdef __GNUC__
88/*
89 * Broken hdrs.
90 */
82# ifdef __GNUC__
83/*
84 * Broken hdrs.
85 */
91extern char *getenv __P((const char *));
92extern int fprintf __P((FILE *, const char *, ...));
93extern int sigsetmask __P((int));
94extern int sigblock __P((int));
95extern int ioctl __P((int, int, void *));
96extern int fputc __P((int, FILE *));
97extern int fgetc __P((FILE *));
98extern int fflush __P((FILE *));
99extern int tolower __P((int));
100extern int toupper __P((int));
86extern char *getenv(const char *);
87extern int fprintf(FILE *, const char *, ...);
88extern int sigsetmask(int);
89extern int sigblock(int);
90extern int ioctl(int, int, void *);
91extern int fputc(int, FILE *);
92extern int fgetc(FILE *);
93extern int fflush(FILE *);
94extern int tolower(int);
95extern int toupper(int);
101extern int errno, sys_nerr;
102extern char *sys_errlist[];
96extern int errno, sys_nerr;
97extern char *sys_errlist[];
103extern void perror __P((const char *));
104extern int read __P((int, const char*, int));
98extern void perror(const char *);
99extern int read(int, const char*, int);
105# include <string.h>
106# define strerror(e) sys_errlist[e]
107# endif
108# ifdef SABER
100# include <string.h>
101# define strerror(e) sys_errlist[e]
102# endif
103# ifdef SABER
109extern ptr_t memcpy __P((ptr_t, const ptr_t, size_t));
110extern ptr_t memset __P((ptr_t, int, size_t));
104extern ptr_t memcpy(ptr_t, const ptr_t, size_t);
105extern ptr_t memset(ptr_t, int, size_t);
111# endif
106# endif
112extern char *fgetline __P((FILE *, int *));
107extern char *fgetline(FILE *, int *);
113#endif
114
115#endif /* _h_sys */
108#endif
109
110#endif /* _h_sys */