~mdcallag/+junk/5.1-map

« back to all changes in this revision

Viewing changes to include/my_global.h

  • Committer: msvensson at pilot
  • Date: 2007-04-24 09:11:45 UTC
  • mfrom: (2469.1.106)
  • Revision ID: sp1r-msvensson@pilot.blaudden-20070424091145-10463
Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
#endif
78
78
#endif /* _WIN32... */
79
79
 
 
80
/* Make it easier to add conditionl code for windows */
 
81
#ifdef __WIN__
 
82
#define IF_WIN(A,B) (A)
 
83
#else
 
84
#define IF_WIN(A,B) (B)
 
85
#endif
 
86
 
80
87
#ifndef EMBEDDED_LIBRARY
81
88
#ifdef WITH_NDB_BINLOG
82
89
#define HAVE_NDB_BINLOG 1
986
993
typedef unsigned long uint32;
987
994
#endif
988
995
#else
989
 
#error "Neither int or long is of 4 bytes width"
 
996
#error Neither int or long is of 4 bytes width
990
997
#endif
991
998
 
992
999
#if !defined(HAVE_ULONG) && !defined(__USE_MISC)
1016
1023
typedef unsigned long long my_ulonglong;
1017
1024
#endif
1018
1025
 
 
1026
#if SIZEOF_CHARP == SIZEOF_INT
 
1027
typedef int intptr;
 
1028
#elif SIZEOF_CHARP == SIZEOF_LONG
 
1029
typedef long intptr;
 
1030
#elif SIZEOF_CHARP == SIZEOF_LONG_LONG
 
1031
typedef long long intptr;
 
1032
#else
 
1033
#error sizeof(void *) is neither sizeof(int) nor sizeof(long) nor sizeof(long long)
 
1034
#endif
 
1035
 
1019
1036
#ifdef USE_RAID
1020
1037
/*
1021
1038
  The following is done with a if to not get problems with pre-processors
1479
1496
#define dlerror() ""
1480
1497
#endif
1481
1498
 
 
1499
#ifndef __NETWARE__
1482
1500
/*
1483
 
  Include standard definitions of operator new and delete.
 
1501
 *  Include standard definitions of operator new and delete.
1484
1502
 */
1485
1503
#ifdef __cplusplus
1486
1504
#include <new>
1487
1505
#endif
 
1506
#else
 
1507
/*
 
1508
 *  Define placement versions of operator new and operator delete since
 
1509
 *  we don't have <new> when building for Netware.
 
1510
 */
 
1511
#ifdef __cplusplus
 
1512
inline void *operator new(size_t, void *ptr) { return ptr; }
 
1513
inline void *operator new[](size_t, void *ptr) { return ptr; }
 
1514
inline void  operator delete(void*, void*) { /* Do nothing */ }
 
1515
inline void  operator delete[](void*, void*) { /* Do nothing */ }
 
1516
#endif
 
1517
#endif
 
1518
 
 
1519
/* Length of decimal number represented by INT32. */
 
1520
#define MY_INT32_NUM_DECIMAL_DIGITS 11
 
1521
 
 
1522
/* Length of decimal number represented by INT64. */
 
1523
#define MY_INT64_NUM_DECIMAL_DIGITS 21
1488
1524
 
1489
1525
#endif /* my_global_h */