1/* foo.h -- interface to the libfoo library
2   Copyright (C) 1996-1999 Free Software Foundation, Inc.
3   Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4   This file is part of GNU Libtool.
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2 of the License, or
9(at your option) any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; if not, write to the Free Software
18Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
19USA. */
20
21/* Only include this header file once. */
22#ifndef _FOO_H_
23#define _FOO_H_ 1
24
25/* At some point, cygwin will stop defining __CYGWIN32__, but b19 and
26 * earlier do not define __CYGWIN__.  This snippit allows us to check
27 * for __CYGWIN__ reliably for both current, old, and (probable) future
28 * releases.
29 */
30#ifdef __CYGWIN32__
31#  ifndef __CYGWIN__
32#    define __CYGWIN__
33#  endif
34#endif
35
36/* __BEGIN_DECLS should be used at the beginning of your declarations,
37   so that C++ compilers don't mangle their names.  Use __END_DECLS at
38   the end of C declarations. */
39#undef __BEGIN_DECLS
40#undef __END_DECLS
41#ifdef __cplusplus
42# define __BEGIN_DECLS extern "C" {
43# define __END_DECLS }
44#else
45# define __BEGIN_DECLS /* empty */
46# define __END_DECLS /* empty */
47#endif
48
49/* LTDL_PARAMS is a macro used to wrap function prototypes, so that compilers
50   that don't understand ANSI C prototypes still work, and ANSI C
51   compilers can issue warnings about type mismatches. */
52#undef LTDL_PARAMS
53#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__CYGWIN__) || defined(__cplusplus)
54# define LT_PARAMS(protos) protos
55# define lt_ptr_t     void*
56#else
57# define LT_PARAMS(protos) ()
58# define lt_ptr_t     char*
59#endif
60
61/* Silly constants that the functions return. */
62#define HELLO_RET 0xe110
63#define FOO_RET 0xf00
64
65
66/* Declarations.  Note the wonderful use of the above macros. */
67__BEGIN_DECLS
68int foo LT_PARAMS((void));
69int hello LT_PARAMS((void));
70extern int nothing;
71__END_DECLS
72
73#endif /* !_FOO_H_ */
74