summaryrefslogtreecommitdiff
path: root/pjlib/include/pj/compat/cc_gcc.h
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-07-22 13:42:56 +0000
committerBenny Prijono <bennylp@teluu.com>2006-07-22 13:42:56 +0000
commitca0e9bd20df27bb62875130a0db513256c92e75a (patch)
tree76e9d620d2826839286c2b6216c9d2d5df3ad44d /pjlib/include/pj/compat/cc_gcc.h
parent26e9af9bcbc271bc373dd9f106fd7b143efe7474 (diff)
Changed all public header files to compile correctly when -ansi and -pedantic is used, also when g++ is used
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@622 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/compat/cc_gcc.h')
-rw-r--r--pjlib/include/pj/compat/cc_gcc.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/pjlib/include/pj/compat/cc_gcc.h b/pjlib/include/pj/compat/cc_gcc.h
index 46b6afc0..1cbc3534 100644
--- a/pjlib/include/pj/compat/cc_gcc.h
+++ b/pjlib/include/pj/compat/cc_gcc.h
@@ -34,15 +34,23 @@
#define PJ_CC_VER_3 __GNUC_PATCHLEVEL__
-#define PJ_INLINE_SPECIFIER static inline
#define PJ_THREAD_FUNC
#define PJ_NORETURN
-#define PJ_ATTR_NORETURN __attribute__ ((noreturn))
#define PJ_HAS_INT64 1
-typedef long long pj_int64_t;
-typedef unsigned long long pj_uint64_t;
+#ifdef __STRICT_ANSI__
+ #include <inttypes.h>
+ typedef int64_t pj_int64_t;
+ typedef uint64_t pj_uint64_t;
+ #define PJ_INLINE_SPECIFIER static __inline
+ #define PJ_ATTR_NORETURN
+#else
+ typedef long long pj_int64_t;
+ typedef unsigned long long pj_uint64_t;
+ #define PJ_INLINE_SPECIFIER static inline
+ #define PJ_ATTR_NORETURN __attribute__ ((noreturn))
+#endif
#define PJ_INT64(val) val##LL
#define PJ_UINT64(val) val##LLU