~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to include/my_global.h

  • Committer: Stewart Smith
  • Date: 2008-07-09 01:40:54 UTC
  • mfrom: (105 drizzle)
  • mto: This revision was merged to the branch mainline in revision 111.
  • Revision ID: stewart@flamingspork.com-20080709014054-xfgfzirbhqzrzkkj
mergeĀ fromĀ mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
#define C_MODE_END
51
51
#endif
52
52
 
53
 
#include <my_config.h>
 
53
#include <config.h>
54
54
#if defined(__cplusplus) && defined(inline)
55
55
#undef inline                           /* fix configure problem */
56
56
#endif
276
276
#ifdef HAVE_LIMITS_H
277
277
#include <limits.h>
278
278
#endif
279
 
#ifdef HAVE_FLOAT_H
280
 
#include <float.h>
281
 
#endif
282
279
 
283
280
#ifdef HAVE_SYS_TYPES_H
284
281
#include <sys/types.h>
490
487
 
491
488
#ifndef O_SHARE                 /* Probably not windows */
492
489
#define O_SHARE         0       /* Flag to my_open for shared files */
 
490
#endif /* O_SHARE */
 
491
 
493
492
#ifndef O_BINARY
494
493
#define O_BINARY        0       /* Flag to my_open for binary files */
495
494
#endif
 
495
 
496
496
#ifndef FILE_BINARY
497
497
#define FILE_BINARY     O_BINARY /* Flag to my_fopen for binary streams */
498
498
#endif
499
 
#ifdef HAVE_FCNTL
500
 
#define HAVE_FCNTL_LOCK
 
499
 
501
500
#define F_TO_EOF        0L      /* Param to lockf() to lock rest of file */
502
 
#endif
503
 
#endif /* O_SHARE */
504
501
 
505
502
#ifndef O_TEMPORARY
506
503
#define O_TEMPORARY     0
623
620
#define INT_MAX8        0x7F
624
621
#define UINT_MAX8       0xFF
625
622
 
 
623
#ifdef HAVE_FLOAT_H
 
624
#include <float.h>
 
625
#else
 
626
#if !defined(FLT_MIN)
 
627
#define FLT_MIN         ((float)1.40129846432481707e-45)
 
628
#endif
 
629
#if !defined(FLT_MAX)
 
630
#define FLT_MAX         ((float)3.40282346638528860e+38)
 
631
#endif
 
632
#endif
 
633
 
626
634
/* From limits.h instead */
627
635
#ifndef DBL_MIN
628
636
#define DBL_MIN         4.94065645841246544e-324
629
 
#define FLT_MIN         ((float)1.40129846432481707e-45)
630
637
#endif
631
638
#ifndef DBL_MAX
632
639
#define DBL_MAX         1.79769313486231470e+308
633
 
#define FLT_MAX         ((float)3.40282346638528860e+38)
634
640
#endif
635
641
#ifndef SIZE_T_MAX
636
642
#define SIZE_T_MAX ~((size_t) 0)
777
783
 
778
784
#define MY_ERRPTR ((void*)(intptr)1)
779
785
 
780
 
#ifdef USE_RAID
781
 
/*
782
 
  The following is done with a if to not get problems with pre-processors
783
 
  with late define evaluation
784
 
*/
785
 
#if SIZEOF_OFF_T == 4
786
 
#define SYSTEM_SIZEOF_OFF_T 4
787
 
#else
788
 
#define SYSTEM_SIZEOF_OFF_T 8
789
 
#endif
790
 
#undef  SIZEOF_OFF_T
791
 
#define SIZEOF_OFF_T        8
792
 
#else
793
 
#define SYSTEM_SIZEOF_OFF_T SIZEOF_OFF_T
794
 
#endif /* USE_RAID */
795
 
 
796
786
#if SIZEOF_OFF_T > 4
797
787
typedef ulonglong my_off_t;
798
788
#else
825
815
#define INT32(v)        (int32) (v)
826
816
#define MYF(v)          (myf) (v)
827
817
 
828
 
#ifndef LL
829
 
#define LL(A) A ## L
830
 
#endif
831
 
 
832
 
#ifndef ULL
833
 
#define ULL(A) A ## UL
834
 
#endif
835
 
 
836
818
/*
837
819
  Sometimes we want to make sure that the variable is not put into
838
820
  a register in debugging mode so we can see its value in the core
1189
1171
/* Length of decimal number represented by INT64. */
1190
1172
#define MY_INT64_NUM_DECIMAL_DIGITS 21
1191
1173
 
 
1174
#ifdef _cplusplus
 
1175
#include <string>
 
1176
#endif
 
1177
 
1192
1178
/* Define some useful general macros (should be done after all headers). */
1193
1179
#if !defined(max)
1194
1180
#define max(a, b)       ((a) > (b) ? (a) : (b))