~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/global.h

  • Committer: Monty Taylor
  • Date: 2008-09-23 06:09:48 UTC
  • mto: This revision was merged to the branch mainline in revision 419.
  • Revision ID: monty@inaugust.com-20080923060948-pec1d5wxetf84tte
Cleaned up stuff out of global.h.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
#define __i386__
45
45
#endif
46
46
 
47
 
/* Macros to make switching between C and C++ mode easier */
48
 
#ifdef __cplusplus
49
 
#define C_MODE_START    extern "C" {
50
 
#define C_MODE_END      }
51
 
#else
52
 
#define C_MODE_START
53
 
#define C_MODE_END
54
 
#endif
55
 
 
56
47
#include "config.h"
57
48
 
58
49
/*
407
398
extern char _dig_vec_upper[];
408
399
extern char _dig_vec_lower[];
409
400
 
410
 
#define CMP_NUM(a,b)    (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
411
 
#define sgn(a)          (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
412
401
#define test(a)         ((a) ? 1 : 0)
413
402
#define set_if_bigger(a,b)  do { if ((a) < (b)) (a)=(b); } while(0)
414
403
#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
431
420
#define my_const_cast(A) (A)
432
421
#endif
433
422
 
434
 
/* From old s-system.h */
435
 
 
436
 
/*
437
 
  Support macros for non ansi & other old compilers. Since such
438
 
  things are no longer supported we do nothing. We keep then since
439
 
  some of our code may still be needed to upgrade old customers.
440
 
*/
441
 
#define _VARARGS(X) X
442
 
#define _STATIC_VARARGS(X) X
443
 
#define _PC(X)  X
444
 
 
445
 
#define MIN_ARRAY_SIZE  0       /* Zero or One. Gcc allows zero*/
446
 
#define ASCII_BITS_USED 8       /* Bit char used */
447
 
 
448
423
/* Some types that is different between systems */
449
424
 
450
425
typedef int     File;           /* File descriptor */
451
426
/* Type for fuctions that handles signals */
 
427
/* RETSIGTYPE is defined by autoconf */
452
428
#define sig_handler RETSIGTYPE
453
 
C_MODE_START
454
 
typedef void    (*sig_return)(void);/* Returns type from signal */
455
 
typedef int     (*qsort_cmp)(const void *,const void *);
456
 
typedef int     (*qsort_cmp2)(void*, const void *,const void *);
457
 
C_MODE_END
458
 
#define qsort_t RETQSORTTYPE    /* Broken GCC cant handle typedef !!!! */
 
429
 
 
430
#ifdef __cplusplus
 
431
extern "C" {
 
432
#endif
 
433
 
 
434
  typedef void (*sig_return)(void);/* Returns type from signal */
 
435
  typedef int  (*qsort_cmp)(const void *,const void *);
 
436
  typedef int  (*qsort_cmp2)(void*, const void *,const void *);
 
437
 
 
438
#ifdef __cplusplus
 
439
}
 
440
#endif
 
441
 
459
442
#ifdef HAVE_SYS_SOCKET_H
460
443
#include <sys/socket.h>
461
444
#endif
686
669
#define MY_HOW_OFTEN_TO_WRITE   1000    /* How often we want info on screen */
687
670
 
688
671
 
689
 
 
690
 
 
691
 
/* my_sprintf  was here. RIP */
692
 
 
693
672
#if defined(HAVE_CHARSET_utf8mb3) || defined(HAVE_CHARSET_utf8mb4)
694
673
#define DRIZZLE_UNIVERSAL_CLIENT_CHARSET "utf8"
695
674
#else