summaryrefslogtreecommitdiffstats
path: root/src/lib/gssapi
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-04-20 15:44:40 +0000
committerTheodore Tso <tytso@mit.edu>1995-04-20 15:44:40 +0000
commit4b316d0c2d990e5489019c1612eddeace3456d17 (patch)
tree78d016aa2deef1d9c4d157fa5c69a462bce3c3a6 /src/lib/gssapi
parentd095910a71a435e4628294962f9f554fc26f3bfd (diff)
downloadkrb5-4b316d0c2d990e5489019c1612eddeace3456d17.tar.gz
krb5-4b316d0c2d990e5489019c1612eddeace3456d17.tar.xz
krb5-4b316d0c2d990e5489019c1612eddeace3456d17.zip
configure.in: Add checking for SIZEOF_SHORT, SIZEOF_INT, and
SIZEOF_LONG, so we don't need to depend on getting this information from include/krb5/autoconf.h gssapi.h: Removed dependence on krb5 include files. gssapiP_generic.h: We need to include k5-config in order to get Windows specific hackery. Somewhat of a wart, but this is a gssapi internal header file, so the rest of the world doesn't have to see this. util_token.c: Define VALID_INT, instead of relying on this being defined by krb5.h. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5388 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/gssapi')
-rw-r--r--src/lib/gssapi/generic/ChangeLog16
-rw-r--r--src/lib/gssapi/generic/configure.in3
-rw-r--r--src/lib/gssapi/generic/gssapi.h39
-rw-r--r--src/lib/gssapi/generic/gssapiP_generic.h2
-rw-r--r--src/lib/gssapi/generic/util_token.c6
5 files changed, 61 insertions, 5 deletions
diff --git a/src/lib/gssapi/generic/ChangeLog b/src/lib/gssapi/generic/ChangeLog
index e28a50767..694c6160c 100644
--- a/src/lib/gssapi/generic/ChangeLog
+++ b/src/lib/gssapi/generic/ChangeLog
@@ -1,3 +1,19 @@
+Thu Apr 20 11:41:04 1995 <tytso@rsx-11.mit.edu>
+
+ * configure.in: Add checking for SIZEOF_SHORT, SIZEOF_INT, and
+ SIZEOF_LONG, so we don't need to depend on getting this
+ information from include/krb5/autoconf.h
+
+ * gssapi.h: Removed dependence on krb5 include files.
+
+ * gssapiP_generic.h: We need to include k5-config in order to get
+ Windows specific hackery. Somewhat of a wart, but this is
+ a gssapi internal header file, so the rest of the world
+ doesn't have to see this.
+
+ * util_token.c: Define VALID_INT, instead of relying on this being
+ defined by krb5.h.
+
Thu Apr 13 16:27:56 1995 Keith Vetter (keithv@fusion.com)
* gssapi_e.c: __STDC__ conditional also checks the _WINDOWS define.
diff --git a/src/lib/gssapi/generic/configure.in b/src/lib/gssapi/generic/configure.in
index 7a95a174b..aaf5ee2cc 100644
--- a/src/lib/gssapi/generic/configure.in
+++ b/src/lib/gssapi/generic/configure.in
@@ -6,6 +6,9 @@ ET_RULES
SubdirLibraryRule([${OBJS}])
KRB_INCLUDE
AC_SIZE_T
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
CopySrcHeader(gssapi.h,[$(EHDRDIR)])
CopySrcHeader(gssapi_generic.h,[$(EHDRDIR)])
V5_AC_OUTPUT_MAKEFILE
diff --git a/src/lib/gssapi/generic/gssapi.h b/src/lib/gssapi/generic/gssapi.h
index 61d01de0d..9c82c9da6 100644
--- a/src/lib/gssapi/generic/gssapi.h
+++ b/src/lib/gssapi/generic/gssapi.h
@@ -24,10 +24,6 @@
#define _GSSAPI_H_
/* for general config: */
-#include "k5-config.h"
-#include "osconf.h"
-/* for prototype-related config: */
-#include "base-defs.h"
#ifndef NO_STDLIB_H
#include <stdlib.h>
#endif
@@ -36,11 +32,44 @@
/*
* First, define the platform-dependent types.
*/
-typedef krb5_ui_4 OM_uint32;
+
+#ifdef _MSDOS
+#define GSS_SIZEOF_INT 2
+#define GSS_SIZEOF_SHORT 2
+#define GSS_SIZEOF_LONG 4
+#ifndef FAR
+#define FAR _far
+#define INTERFACE __far __export __pascal
+#endif /* FAR */
+#else /* _MSDOS */
+/*
+ * XXX we need to fix this to be modified by autoconf...
+ */
+#define GSS_SIZEOF_INT 4
+#define GSS_SIZEOF_LONG 4
+#define GSS_SIZEOF_SHORT 2
+#ifndef FAR
+#define FAR
+#define INTERFACE
+#endif /* FAR */
+#endif
+
+#if (GSS_SIZEOF_INT == 4)
+typedef unsigned int OM_uint32;
+#elif (GSS_SIZEOF_LONG == 4)
+typedef unsigned long OM_uint32;
+#elif (GSS_SIZEOF_SHORT == 4)
+typedef unsigned short OM_uint32;
+#endif
+
typedef void FAR * gss_name_t;
typedef void FAR * gss_cred_id_t;
typedef void FAR * gss_ctx_id_t;
+#if defined(__STDC__) || defined(_WINDOWS)
+#define PROTOTYPE(x) x
+#endif
+
/*
* Note that a platform supporting the xom.h X/Open header file
* may make use of that header for the definitions of OM_uint32
diff --git a/src/lib/gssapi/generic/gssapiP_generic.h b/src/lib/gssapi/generic/gssapiP_generic.h
index 49a876bf9..c740d98be 100644
--- a/src/lib/gssapi/generic/gssapiP_generic.h
+++ b/src/lib/gssapi/generic/gssapiP_generic.h
@@ -23,6 +23,8 @@
#ifndef _GSSAPIP_GENERIC_H_
#define _GSSAPIP_GENERIC_H_
+#include "k5-config.h"
+
#include "gssapi.h"
#include "gssapi_err_generic.h"
diff --git a/src/lib/gssapi/generic/util_token.c b/src/lib/gssapi/generic/util_token.c
index c37819894..eadfad82a 100644
--- a/src/lib/gssapi/generic/util_token.c
+++ b/src/lib/gssapi/generic/util_token.c
@@ -23,6 +23,12 @@
#include "gssapiP_generic.h"
#include <memory.h>
+#if (SIZEOF_INT == 2)
+#define VALID_INT_BITS 0x7fff
+#elif (SIZEOF_INT == 4)
+#define VALID_INT_BITS 0x7fffffff
+#endif
+
/* XXXX this code currently makes the assumption that a mech oid will
never be longer than 127 bytes. This assumption is not inherent in
the interfaces, so the code can be fixed if the OSI namespace