]> 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>
Thu, 17 Dec 2009 06:46:05 +0000 (22:46 -0800)
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>
(cherry picked from commit 98f9b6ae2bafe69440c090443efb2f71ec15309c)
Change-Id: Ied35fdf7c325dbc63bdef1e1ebb328c455bc0133
Reviewed-on: http://gerrit.openafs.org/957

src/config/afsconfig-windows.h
src/des/crypt.c

index c0ce4f4cf0b2122a600e87b0fa10f144434260a9..8d1f915409a830f394f085504d53556b18990d72 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 346ef50d359235a8640333336038abaab4dd1670..71c59b57fcecf59df913abe786888f6f725238a7 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.
@@ -247,7 +237,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;