2 * decl - variable and function declaration macros
4 * Copyright (C) 2007 Landon Curt Noll
6 * Primary author: Landon Curt Noll
8 * Calc is open software; you can redistribute it and/or modify it under
9 * the terms of the version 2.1 of the GNU Lesser General Public License
10 * as published by the Free Software Foundation.
12 * Calc is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
15 * Public License for more details.
17 * A copy of version 2.1 of the GNU Lesser General Public License is
18 * distributed with calc under the filename COPYING-LGPL. You should have
19 * received a copy with calc; if not, write to Free Software Foundation, Inc.
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * @(#) $Revision: 30.4 $
23 * @(#) $Id: decl.h,v 30.4 2013/08/11 08:41:38 chongo Exp $
24 * @(#) $Source: /usr/local/src/bin/calc/RCS/decl.h,v $
26 * Under source code control: 2007/02/09 05:24:25
27 * File existed as early as: 2007
29 * Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/
33 #include "have_const.h"
36 #if !defined(__DECL_H__)
41 * Thread Local Storage macros
43 * NOTE: The use of -DWITH_TLS is extremely experimental. Calc may not
44 * compile with WITH_TLS defined.
49 /* variable related macros */
50 # define EXTERN extern __thread
51 # define STATIC static __thread
53 /* function related macros */
54 # define E_FUNC extern
55 # define S_FUNC static
61 #elif defined(_WIN32) || defined(WINDOZ)
64 /* determine which type of DLL we must generate */
65 # if !defined(STATIC_ONLY)
66 # if defined(_EXPORTING)
67 # define DLL __declspec(dllexport)
69 # define DLL __declspec(dllimport)
75 /* variable related macros */
76 # define EXTERN extern DLL
77 # define STATIC static
79 /* function related macros */
80 # define E_FUNC extern DLL
81 # define S_FUNC static
90 /* variable related macros */
91 # define EXTERN extern
92 # define STATIC static
94 /* function related macros */
95 # define E_FUNC extern
96 # define S_FUNC static
101 /* Perform printf-style argument type checking for known compilers */
103 # define PRINTF_FORMAT(fmt_idx, arg_idx) __attribute__ \
104 ((format (printf, fmt_idx, arg_idx)))
106 # define PRINTF_FORMAT(fmt_idx, arg_idx)
109 #endif /* !__DECL_H__ */