diff options
author | Michiel van Baak <michiel@vanbaak.info> | 2008-06-19 20:48:33 +0000 |
---|---|---|
committer | Michiel van Baak <michiel@vanbaak.info> | 2008-06-19 20:48:33 +0000 |
commit | 8e8359465b7002ddb955fa898b3c57a35132683f (patch) | |
tree | 7b42274bee0dd9b38bbd91570bf09a13d1c6aef0 /include | |
parent | 2e0afd805b263ba915a711f802ae3ad583644adc (diff) |
Older versions of GNU gcc do not allow 'NULL' as sentinel.
They want (char *)NULL as sentinel.
An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4
This commit introduces a contstant SENTINEL which is declared as:
#define SENTINEL ((char *)NULL)
All places I could test compile on my openbsd system are converted.
Update CODING-GUIDELINES to tell about this constant.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/compiler.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asterisk/compiler.h b/include/asterisk/compiler.h index b6575d000..b2db7ffdb 100644 --- a/include/asterisk/compiler.h +++ b/include/asterisk/compiler.h @@ -65,4 +65,7 @@ #define attribute_warn_unused_result #endif +/* Some older version of GNU gcc (3.3.5 on OpenBSD 4.3 for example) dont like 'NULL' as sentinel */ +#define SENTINEL ((char *)NULL) + #endif /* _ASTERISK_COMPILER_H */ |