8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-27 20:03:03 +01:00
firebird-mirror/src/include/firebird.h

126 lines
3.4 KiB
C
Raw Normal View History

2004-05-24 01:28:26 +02:00
#ifndef INCLUDE_Firebird_H
#define INCLUDE_Firebird_H
2001-07-29 19:19:15 +02:00
/*
* The contents of this file are subject to the Mozilla Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
* Alternatively, the contents of this file may be used under the
* terms of the GNU General Public License Version 2 or later (the
* "GPL"), in which case the provisions of the GPL are applicable
* instead of those above. You may obtain a copy of the Licence at
* http://www.gnu.org/copyleft/gpl.html
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Relevant for more details.
*
* This file was created by members of the firebird development team.
* All individual contributions remain the Copyright (C) of those
* individuals. Contributors to this file are either listed here or
* can be obtained from a CVS history command.
*
* All rights reserved.
*
* Contributor(s):
* Mark O'Donohue <mark.odonohue@ludwig.edu.au>
2001-12-28 06:16:31 +01:00
* Mike Nordell <tamlin@algonet.se>
2001-07-29 19:19:15 +02:00
* John Bellardo <bellardo@cs.ucsd.edu>
*
*
* $Id: firebird.h,v 1.29 2004-08-16 12:28:43 alexpeshkoff Exp $
2001-07-29 19:19:15 +02:00
*
*/
#include "gen/autoconfig.h"
2004-07-31 00:38:08 +02:00
// Using our debugging code is pointless when we may use Valgrind features
#if defined(DEV_BUILD) && !defined(USE_VALGRIND)
#define DEBUG_GDS_ALLOC
#endif
2003-01-18 20:39:12 +01:00
#if defined(WIN_NT)
2001-12-28 06:16:31 +01:00
#define FB_DLL_EXPORT __declspec(dllexport)
#else
#define FB_DLL_EXPORT
#endif
2002-09-27 15:12:46 +02:00
#if defined(SOLX86)
2004-05-19 01:27:06 +02:00
// this pragmas is used only with gcc 2.95!
//#define __PRAGMA_REDEFINE_EXTNAME
//#define __EXTENSIONS__
//
2002-09-27 15:12:46 +02:00
#endif
2001-12-28 06:16:31 +01:00
//
// Macro for function attribute definition
//
2003-03-09 03:23:56 +01:00
#if defined(__GNUC__)
#define ATTRIBUTE_FORMAT(a,b) __attribute__ ((format(printf,a,b)))
#else
#define ATTRIBUTE_FORMAT(a,b)
#endif
2001-12-24 03:51:06 +01:00
#ifdef __cplusplus
#include "fb_exception.h"
#endif
2001-07-29 19:19:15 +02:00
//
#if defined(SUPERSERVER) || defined(WIN_NT)
2004-05-18 23:55:27 +02:00
#define SERVER_SHUTDOWN
#endif
// from thd.h
#ifdef HAVE_POSIX_THREADS
#ifdef SUPERSERVER
#define USE_POSIX_THREADS
#endif
#ifdef SUPERCLIENT
#if defined(LINUX) || defined(FREEBSD)
/* The following ifdef was added to build thread safe gds shared
library on linux platform. It seems the gdslib works now (20020220)
with thread enabled applications. Anyway, more tests should be
done as I don't have deep knowledge of the interbase/firebird
engine and this change may imply side effect I haven't known
about yet. Tomas Nejedlik (tomas@nejedlik.cz) */
#define USE_POSIX_THREADS
#endif
#endif
#endif
// Check if we need thread synchronization
#if defined(HAVE_MULTI_THREAD)
# if defined(SUPERSERVER) || defined(SUPERCLIENT) || \
defined(WIN_NT) || defined(SOLARIS_MT) || defined (VMS)
# define MULTI_THREAD
# endif
#endif
// This is needed to build client library on threaded platforms for classic server
#if defined(HAVE_POSIX_THREADS) && defined(SUPERCLIENT)
# define MULTI_THREAD
#endif
#ifdef MULTI_THREAD
#define ANY_THREADING
#endif
#ifdef V4_THREADING
#define ANY_THREADING
#endif
#ifndef NULL
#define NULL 0L
#endif
#if defined(WIN_NT) && defined(SUPERSERVER) && !defined(EMBEDDED)
// Comment this definition to build without priority scheduler
// OR:
// Uncomment this definition to build with priority scheduler
#define THREAD_PSCHED
#endif
2004-05-24 01:28:26 +02:00
#endif /* INCLUDE_Firebird_H */
2003-12-31 06:36:12 +01:00