From a6e4a4170c64160f66c89b328a424dd2e9999eae Mon Sep 17 00:00:00 2001 From: John Carr Date: Sun, 23 Feb 1992 12:08:44 +0000 Subject: [PATCH] Make use of "const" and "volatile" configurable git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2216 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/krb5/base-defs.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/include/krb5/base-defs.h b/src/include/krb5/base-defs.h index ce2897417..a1f8f3e55 100644 --- a/src/include/krb5/base-defs.h +++ b/src/include/krb5/base-defs.h @@ -59,17 +59,22 @@ typedef struct _krb5_data { char *data; } krb5_data; +/* make const & volatile available without effect */ + +#if !defined(__STDC__) && !defined(HAS_ANSI_CONST) +#define const +#endif +#if !defined(__STDC__) && !defined(HAS_ANSI_VOLATILE) +#define volatile +#endif -#ifdef __STDC__ +#if defined(__STDC__) || defined(HAS_VOID_TYPE) typedef void * krb5_pointer; typedef void const * krb5_const_pointer; #else -/* make const & volatile available without effect */ -#define const -#define volatile typedef char * krb5_pointer; -typedef char * krb5_const_pointer; -#endif /* __STDC__ */ +typedef char const * krb5_const_pointer; +#endif #if defined(__STDC__) || defined(KRB5_PROVIDE_PROTOTYPES) #define PROTOTYPE(x) x -- 2.26.2