Make use of "const" and "volatile" configurable
authorJohn Carr <jfc@mit.edu>
Sun, 23 Feb 1992 12:08:44 +0000 (12:08 +0000)
committerJohn Carr <jfc@mit.edu>
Sun, 23 Feb 1992 12:08:44 +0000 (12:08 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2216 dc483132-0cff-0310-8789-dd5450dbe970

src/include/krb5/base-defs.h

index ce28974177a4b5528922bae6ff5abc6c67cf4b77..a1f8f3e55cca443c0c4860a865429f9456649cbf 100644 (file)
@@ -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