1 /**	$MirOS: src/lib/libedit/sys.h,v 1.3 2005/04/19 15:16:16 tg Exp $ */
2 /*	$NetBSD: sys.h,v 1.9 2004/01/17 17:57:40 christos Exp $	*/
3 /*	$OpenBSD: sys.h,v 1.8 2003/10/31 08:42:24 otto Exp $	*/
4 
5 /*-
6  * Copyright (c) 1992, 1993
7  *	The Regents of the University of California.  All rights reserved.
8  *
9  * This code is derived from software contributed to Berkeley by
10  * Christos Zoulas of Cornell University.
11  *
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions
14  * are met:
15  * 1. Redistributions of source code must retain the above copyright
16  *    notice, this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright
18  *    notice, this list of conditions and the following disclaimer in the
19  *    documentation and/or other materials provided with the distribution.
20  * 3. Neither the name of the University nor the names of its contributors
21  *    may be used to endorse or promote products derived from this software
22  *    without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
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  */
38 
39 /*
40  * sys.h: Put all the stupid compiler and system dependencies here...
41  */
42 #ifndef _h_sys
43 #define	_h_sys
44 
45 #ifdef HAVE_SYS_CDEFS_H
46 #include <sys/cdefs.h>
47 #endif
48 
49 #if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__)  || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
50 # define __attribute__(A)
51 #endif
52 
53 #ifndef __BEGIN_DECLS
54 # ifdef  __cplusplus
55 #  define __BEGIN_DECLS  extern "C" {
56 #  define __END_DECLS    }
57 # else
58 #  define __BEGIN_DECLS
59 #  define __END_DECLS
60 # endif
61 #endif
62 
63 #ifndef public
64 # define public		/* Externally visible functions/variables */
65 #endif
66 
67 #ifndef private
68 # define private	static	/* Always hidden internals */
69 #endif
70 
71 #ifndef protected
72 # define protected	/* Redefined from elsewhere to "static" */
73 			/* When we want to hide everything	*/
74 #endif
75 
76 #ifndef _PTR_T
77 # define _PTR_T
78 typedef void	*ptr_t;
79 #endif
80 
81 #ifndef _IOCTL_T
82 # define _IOCTL_T
83 typedef void	*ioctl_t;
84 #endif
85 
86 #include <stdio.h>
87 
88 #ifndef HAVE_FGETLN
89 #define	fgetln libedit_fgetln
90 char	*fgetln(FILE *fp, size_t *len);
91 #endif
92 
93 #define	REGEX		/* Use POSIX.2 regular expression functions */
94 #undef	REGEXP		/* Use UNIX V8 regular expression functions */
95 
96 #endif /* _h_sys */
97