]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
des crypt cope with 64 bit longs
authorDerrick Brashear <shadow@dementia.org>
Fri, 11 Sep 2009 05:28:49 +0000 (01:28 -0400)
committerDerrick Brashear <shadow|account-1000005@unknown>
Fri, 11 Sep 2009 06:09:58 +0000 (23:09 -0700)
we test for them in configure; instead of hardcoding it in yet
another place, use the information we have

Reviewed-on: http://gerrit.openafs.org/442
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/config/afsconfig-windows.h
src/des/crypt.c

index 3374990926a486eef31ccb09740043bbc15a9996..05de66a826246be4f96a386514a33510cbc0140e 100644 (file)
@@ -33,6 +33,9 @@
 /* Define as the return type of signal handlers (int or void).  */
 #undef RETSIGTYPE
 
+/* The size of `long', as computed by sizeof. */
+#define SIZEOF_LONG 4
+
 /* Define to `unsigned' if <sys/types.h> doesn't define.  */
 //#undef size_t unsigned int 
 
index 2f00a78f89f0a2b6a4e0298380d4a7cfc8a88d44..73e1719676d2385eb3b04e52e046f15a7858c261 100644 (file)
 #endif
 #endif
 
-/*
- * define "LONG_IS_32_BITS" only if sizeof(long)==4.
- * This avoids use of bit fields (your compiler may be sloppy with them).
- */
-
-/* XXX shouldn't this be !AFS_64BIT_ENV ? */
-#if !defined(cray) && !defined(AFS_ALPHA_LINUX20_ENV) && !defined(AFS_IA64_LINUX20_ENV) && !defined(AFS_AMD64_LINUX20_ENV) && !defined(AFS_PPC64_LINUX20_ENV) & !defined(AFS_S390X_LINUX20_ENV)
-#define        LONG_IS_32_BITS
-#endif
-
 /*
  * define "B64" to be the declaration for a 64 bit integer.
  * XXX this feature is currently unused, see "endian" comment below.
@@ -240,7 +230,7 @@ STATIC prtab();
 typedef union {
     unsigned char b[8];
     struct {
-#if defined(LONG_IS_32_BITS)
+#if (SIZEOF_LONG == 4)
        /* long is often faster than a 32-bit bit field */
        long i0;
        long i1;