diff options
author | miod <> | 2014-07-09 16:06:14 +0000 |
---|---|---|
committer | miod <> | 2014-07-09 16:06:14 +0000 |
commit | eb3e7d7ffe444652fe6f90808f95e08bc99cf5ae (patch) | |
tree | 49de6ec1ff73debc360d8605d09d765a8e604a22 /src/lib/libcrypto/des/cfb_enc.c | |
parent | 241b6a38fd4cff90e8e18e7c8dd2e6371f86a8e9 (diff) | |
download | openbsd-eb3e7d7ffe444652fe6f90808f95e08bc99cf5ae.tar.gz openbsd-eb3e7d7ffe444652fe6f90808f95e08bc99cf5ae.tar.bz2 openbsd-eb3e7d7ffe444652fe6f90808f95e08bc99cf5ae.zip |
Remove leading underscore from _BYTE_ORDER and _{LITTLE,BIG}_ENDIAN, to be
more friendly to systems where the underscore flavours may be defined as empty.
Found the hard way be bcook@; joint brainstrom with bcook beck and guenther
Diffstat (limited to 'src/lib/libcrypto/des/cfb_enc.c')
-rw-r--r-- | src/lib/libcrypto/des/cfb_enc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/des/cfb_enc.c b/src/lib/libcrypto/des/cfb_enc.c index 94ef35878f..b8c510067c 100644 --- a/src/lib/libcrypto/des/cfb_enc.c +++ b/src/lib/libcrypto/des/cfb_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cfb_enc.c,v 1.10 2014/06/12 15:49:28 deraadt Exp $ */ | 1 | /* $OpenBSD: cfb_enc.c,v 1.11 2014/07/09 16:06:13 miod Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -77,7 +77,7 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, | |||
77 | register int num=numbits/8,n=(numbits+7)/8,i,rem=numbits%8; | 77 | register int num=numbits/8,n=(numbits+7)/8,i,rem=numbits%8; |
78 | DES_LONG ti[2]; | 78 | DES_LONG ti[2]; |
79 | unsigned char *iv; | 79 | unsigned char *iv; |
80 | #if _BYTE_ORDER != _LITTLE_ENDIAN | 80 | #if BYTE_ORDER != LITTLE_ENDIAN |
81 | unsigned char ovec[16]; | 81 | unsigned char ovec[16]; |
82 | #else | 82 | #else |
83 | unsigned int sh[4]; | 83 | unsigned int sh[4]; |
@@ -115,7 +115,7 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, | |||
115 | { v0=d0; v1=d1; } | 115 | { v0=d0; v1=d1; } |
116 | else | 116 | else |
117 | { | 117 | { |
118 | #if _BYTE_ORDER != _LITTLE_ENDIAN | 118 | #if BYTE_ORDER != LITTLE_ENDIAN |
119 | iv=&ovec[0]; | 119 | iv=&ovec[0]; |
120 | l2c(v0,iv); | 120 | l2c(v0,iv); |
121 | l2c(v1,iv); | 121 | l2c(v1,iv); |
@@ -130,7 +130,7 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, | |||
130 | for(i=0 ; i < 8 ; ++i) | 130 | for(i=0 ; i < 8 ; ++i) |
131 | ovec[i]=ovec[i+num]<<rem | | 131 | ovec[i]=ovec[i+num]<<rem | |
132 | ovec[i+num+1]>>(8-rem); | 132 | ovec[i+num+1]>>(8-rem); |
133 | #if _BYTE_ORDER == _LITTLE_ENDIAN | 133 | #if BYTE_ORDER == LITTLE_ENDIAN |
134 | v0=sh[0], v1=sh[1]; | 134 | v0=sh[0], v1=sh[1]; |
135 | #else | 135 | #else |
136 | iv=&ovec[0]; | 136 | iv=&ovec[0]; |
@@ -158,7 +158,7 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, | |||
158 | { v0=d0; v1=d1; } | 158 | { v0=d0; v1=d1; } |
159 | else | 159 | else |
160 | { | 160 | { |
161 | #if _BYTE_ORDER != _LITTLE_ENDIAN | 161 | #if BYTE_ORDER != LITTLE_ENDIAN |
162 | iv=&ovec[0]; | 162 | iv=&ovec[0]; |
163 | l2c(v0,iv); | 163 | l2c(v0,iv); |
164 | l2c(v1,iv); | 164 | l2c(v1,iv); |
@@ -173,7 +173,7 @@ void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, | |||
173 | for(i=0 ; i < 8 ; ++i) | 173 | for(i=0 ; i < 8 ; ++i) |
174 | ovec[i]=ovec[i+num]<<rem | | 174 | ovec[i]=ovec[i+num]<<rem | |
175 | ovec[i+num+1]>>(8-rem); | 175 | ovec[i+num+1]>>(8-rem); |
176 | #if _BYTE_ORDER == _LITTLE_ENDIAN | 176 | #if BYTE_ORDER == LITTLE_ENDIAN |
177 | v0=sh[0], v1=sh[1]; | 177 | v0=sh[0], v1=sh[1]; |
178 | #else | 178 | #else |
179 | iv=&ovec[0]; | 179 | iv=&ovec[0]; |