1 /* foo.h -- interface to the libfoo library
3 Copyright (C) 1996-1999, 2010 Free Software Foundation, Inc.
4 Written by Gord Matzigkeit, 1996
6 This file is part of GNU Libtool.
8 GNU Libtool is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of
11 the License, or (at your option) any later version.
13 GNU Libtool is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU Libtool; see the file COPYING. If not, a copy
20 can be downloaded from http://www.gnu.org/licenses/gpl.html,
21 or obtained by writing to the Free Software Foundation, Inc.,
22 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 /* Only include this header file once. */
29 /* At some point, cygwin will stop defining __CYGWIN32__, but b19 and
30 * earlier do not define __CYGWIN__. This snippit allows us to check
31 * for __CYGWIN32__ reliably for both old and (probable) future releases.
39 /* __BEGIN_DECLS should be used at the beginning of your declarations,
40 so that C++ compilers don't mangle their names. Use __END_DECLS at
41 the end of C declarations. */
45 # define __BEGIN_DECLS extern "C" {
46 # define __END_DECLS }
48 # define __BEGIN_DECLS /* empty */
49 # define __END_DECLS /* empty */
52 /* LTDL_PARAMS is a macro used to wrap function prototypes, so that compilers
53 that don't understand ANSI C prototypes still work, and ANSI C
54 compilers can issue warnings about type mismatches. */
56 #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(__CYGWIN32__) || defined(__cplusplus)
57 # define LT_PARAMS(protos) protos
58 # define lt_ptr_t void*
60 # define LT_PARAMS(protos) ()
61 # define lt_ptr_t char*
64 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
65 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
66 /* DATA imports from DLLs on WIN32 con't be const, because runtime
67 relocations are performed -- see ld's documentation on pseudo-relocs. */
68 # define LT_DLSYM_CONST
69 #elif defined(__osf__)
70 /* This system does not cope well with relocations in const data. */
71 # define LT_DLSYM_CONST
73 # define LT_DLSYM_CONST const
76 #if (defined _WIN32 || defined _WIN32_WCE) && !defined __GNUC__
77 # ifdef BUILDING_LIBHELLO
79 # define LIBHELLO_SCOPE extern __declspec (dllexport)
82 # define LIBHELLO_SCOPE extern __declspec (dllimport)
85 #ifndef LIBHELLO_SCOPE
86 # define LIBHELLO_SCOPE extern
89 /* Silly constants that the functions return. */
90 #define HELLO_RET 0xe110
94 /* Declarations. Note the wonderful use of the above macros. */
96 int foo LT_PARAMS((void));
97 int foo2 LT_PARAMS((void));
98 int hello LT_PARAMS((void));
99 LIBHELLO_SCOPE int nothing;
102 #endif /* !_FOO_H_ */