~drizzle-trunk/drizzle/development

2037.1.1 by kalebral at gmail
More copyright updates
1
# Copyright (C) 2010 Brian Aker
2
#
3
# This file is free software
4
# gives unlimited permission to copy and/or distribute it,
5
# with or without modifications, as long as this notice is preserved.
6
1782 by Brian Aker
This modifies our thread system to be based on boost, and it fixes a
7
AC_DEFUN([DRIZZLE_STACK_DIRECTION],[
8
  AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
9
    [AC_RUN_IFELSE(
10
       [AC_LANG_PROGRAM(
11
          [[
12
	    #include <stdlib.h>
13
14
 /* Prevent compiler optimization by HP's compiler, see bug#42213 */
15
 #if defined(__HP_cc) || defined (__HP_aCC) || defined (__hpux)
16
 #pragma noinline
17
 #endif
18
19
 int find_stack_direction ()
20
 {
21
   static char *addr = 0;
22
   auto char dummy;
23
   if (addr == 0)
24
     {
25
       addr = &dummy;
26
       return find_stack_direction ();
27
     }
28
   else
29
     return (&dummy > addr) ? 1 : -1;
30
 }
31
	  ]],
32
	  [[
33
   exit (find_stack_direction() < 0);
34
	  ]]
35
       )],
36
       [ac_cv_c_stack_direction=1],
37
       [ac_cv_c_stack_direction=-1],
38
       [ac_cv_c_stack_direction=]
39
    )]
40
  )
41
 AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction)
42
])