58
58
/* Make it easier to add conditionl code for windows */
59
59
#define IF_WIN(A,B) (B)
61
/* Some defines to avoid ifdefs in the code */
64
#define NETWARE_SET_SCREEN_MODE(A)
69
62
The macros below are borrowed from include/linux/compiler.h in the
70
63
Linux kernel. Use them to indicate the likelyhood of the truthfulness
115
The following macro is used to ensure that code often used in most
116
SQL statements and definitely for parts of the SQL processing are
117
kept in a code segment by itself. This has the advantage that the
118
risk of common code being overlapping in caches of the CPU is less.
119
This can be a cause of big performance problems.
120
Routines should be put in this category with care and when they are
121
put there one should also strive to make as much of the error handling
122
as possible (or uncommon code of the routine) to execute in a
123
separate method to avoid moving to much code to this code segment.
125
It is very easy to use, simply add HOT_METHOD at the end of the
126
function declaration.
127
For more input see GCC manual (available in GCC 2.95 and later)
130
#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94)
132
__attribute__ ((section ("hot_code_section")))
138
The following macro is used to ensure that popular global variables
139
are located next to each other to avoid that they contend for the
142
It is very easy to use, simply add HOT_DATA at the end of the declaration
143
of the variable, the variable must be initialised because of the way
144
that linker works so a declaration using HOT_DATA should look like:
145
uint global_hot_data HOT_DATA = 0;
146
For more input see GCC manual (available in GCC 2.95 and later)
149
#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94)
151
__attribute__ ((section ("hot_data_section")))
157
108
now let's figure out if inline functions are supported
158
109
autoconf defines 'inline' to be empty, if not
353
304
#define MASTER 1 /* Compile without unireg */
354
305
#define ENGLISH 1 /* Messages in English */
355
306
#define POSIX_MISTAKE 1 /* regexp: Fix stupid spec error */
356
#define USE_REGEX 1 /* We want the use the regex library */
357
307
/* Do not define for ultra sparcs */
358
308
#define USE_BMOVE512 1 /* Use this unless system bmove is faster */
395
345
#define rint(A) floor((A)+(((A) < 0)? -0.5 : 0.5))
398
/* Define some general constants */
400
#define TRUE (1) /* Logical true */
401
#define FALSE (0) /* Logical false */
404
348
#if defined(__GNUC__)
405
349
#define function_volatile volatile
406
350
#define my_reinterpret_cast(A) reinterpret_cast<A>
574
516
#define strtok_r(A,B,C) strtok((A),(B))
578
#if defined(INT64_MAX)
579
#define LONGLONG_MAX INT64_MAX
582
#if defined(INT64_MIN)
583
#define LONGLONG_MIN INT64_MIN
586
#if !defined(ULONGLONG_MAX)
587
/* First check for ANSI C99 definition: */
588
#if defined(UINT64_MAX)
589
#define ULONGLONG_MAX UINT64_MAX
591
#define ULONGLONG_MAX ((uint64_t)(~0ULL))
593
#endif /* !defined(ULONGLONG_MAX)*/
595
#define INT_MIN32 (~0x7FFFFFFFL)
596
#define INT_MAX32 0x7FFFFFFFL
597
#define UINT_MAX32 0xFFFFFFFFL
598
#define INT_MIN24 (~0x007FFFFF)
599
#define INT_MAX24 0x007FFFFF
600
#define UINT_MAX24 0x00FFFFFF
601
#define INT_MIN16 (~0x7FFF)
602
#define INT_MAX16 0x7FFF
603
#define UINT_MAX16 0xFFFF
604
#define INT_MIN8 (~0x7F)
605
#define INT_MAX8 0x7F
606
#define UINT_MAX8 0xFF
608
519
#ifdef HAVE_FLOAT_H
609
520
#include <float.h>