~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to include/my_attribute.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:
22
22
#define _my_attribute_h
23
23
 
24
24
/*
25
 
  Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers.
26
 
  Some forms of __attribute__ are actually supported in earlier versions of
27
 
  g++, but we just disable them all because we only use them to generate
28
 
  compilation warnings.
 
25
  Disable __attribute__ for non GNU compilers, since we're using them
 
26
  only to either generate or suppress warnings.
29
27
*/
30
28
#ifndef __attribute__
31
29
# if !defined(__GNUC__)
32
30
#  define __attribute__(A)
33
 
# elif GCC_VERSION < 2008
34
 
#  define __attribute__(A)
35
 
# elif defined(__cplusplus) && GCC_VERSION < 3004
36
 
#  define __attribute__(A)
37
31
# endif
38
32
#endif
39
33
 
46
40
# define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n)))
47
41
#endif
48
42
 
49
 
/*
50
 
 
51
 
   __attribute__((format(...))) on a function pointer is not supported
52
 
   until  gcc 3.1
53
 
*/
 
43
 
 
44
#endif
 
45
 
54
46
#ifndef ATTRIBUTE_FORMAT_FPTR
55
 
# if (GCC_VERSION >= 3001)
56
 
#  define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n)
57
 
# else
58
 
#  define ATTRIBUTE_FORMAT_FPTR(style, m, n)
59
 
# endif /* GNUC >= 3.1 */
60
 
#endif
61
 
 
62
 
 
 
47
# define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n)
63
48
#endif