~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/global.h

  • Committer: Monty Taylor
  • Date: 2008-12-20 21:07:44 UTC
  • mto: (722.2.2 devel)
  • mto: This revision was merged to the branch mainline in revision 727.
  • Revision ID: monty@inaugust.com-20081220210744-bhmvkzh2qspp9nxt
Cleaned up a few build things.

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
/* Length of decimal number represented by INT64. */
267
267
#define MY_INT64_NUM_DECIMAL_DIGITS 21
268
268
 
 
269
#define PROTOCOL_VERSION 10
 
270
/*
 
271
  Io buffer size; Must be a power of 2 and
 
272
  a multiple of 512. May be
 
273
  smaller what the disk page size. This influences the speed of the
 
274
  isam btree library. eg to big to slow.
 
275
*/
 
276
#define IO_SIZE 4096
 
277
/* Max file name len */
 
278
#define FN_LEN 256
 
279
/* Max length of extension (part of FN_LEN) */
 
280
#define FN_EXTLEN 20
 
281
/* Max length of full path-name */
 
282
#define FN_REFLEN 512
 
283
/* File extension character */
 
284
#define FN_EXTCHAR '.'
 
285
/* ~ is used as abbrev for home dir */
 
286
#define FN_HOMELIB '~'
 
287
/* ./ is used as abbrev for current dir */
 
288
#define FN_CURLIB '.'
 
289
/* Parent directory; Must be a string */
 
290
#define FN_PARENTDIR ".."
 
291
 
 
292
/* Quote argument (before cpp) */
 
293
#ifndef QUOTE_ARG
 
294
# define QUOTE_ARG(x) #x
 
295
#endif
 
296
/* Quote argument, (after cpp) */
 
297
#ifndef STRINGIFY_ARG
 
298
# define STRINGIFY_ARG(x) QUOTE_ARG(x)
 
299
#endif
 
300
 
 
301
/*
 
302
 * The macros below are borrowed from include/linux/compiler.h in the
 
303
 * Linux kernel. Use them to indicate the likelyhood of the truthfulness
 
304
 * of a condition. This serves two purposes - newer versions of gcc will be
 
305
 * able to optimize for branch predication, which could yield siginficant
 
306
 * performance gains in frequently executed sections of the code, and the
 
307
 * other reason to use them is for documentation
 
308
 */
 
309
#if !defined(__GNUC__)
 
310
#define __builtin_expect(x, expected_value) (x)
 
311
#endif
 
312
 
 
313
#define likely(x)  __builtin_expect((x),1)
 
314
#define unlikely(x)  __builtin_expect((x),0)
 
315
 
 
316
 
269
317
/*
270
318
  Only Linux is known to need an explicit sync of the directory to make sure a
271
319
  file creation/deletion/renaming in(from,to) this directory durable.