Fossil SCM
Get rid of the (silly?) int_least16_t type in sha1.c and just use good old "int" instead. Makes things easier to compile on older systems.
Commit
8fb641e071dc2298638dd2aa8e32211c4398261a
Parent
17486c353f2e582…
1 file changed
+1
-3
+1
-3
| --- src/sha1.c | ||
| +++ src/sha1.c | ||
| @@ -11,11 +11,10 @@ | ||
| 11 | 11 | * If you do not have the ISO standard stdint.h header file, then you |
| 12 | 12 | * must typdef the following: |
| 13 | 13 | * name meaning |
| 14 | 14 | * uint32_t unsigned 32 bit integer |
| 15 | 15 | * uint8_t unsigned 8 bit integer (i.e., unsigned char) |
| 16 | - * int_least16_t integer of >= 16 bits | |
| 17 | 16 | * |
| 18 | 17 | */ |
| 19 | 18 | #define SHA1HashSize 20 |
| 20 | 19 | #define shaSuccess 0 |
| 21 | 20 | #define shaInputTooLong 1 |
| @@ -30,12 +29,11 @@ | ||
| 30 | 29 | uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */ |
| 31 | 30 | |
| 32 | 31 | uint32_t Length_Low; /* Message length in bits */ |
| 33 | 32 | uint32_t Length_High; /* Message length in bits */ |
| 34 | 33 | |
| 35 | - /* Index into message block array */ | |
| 36 | - int_least16_t Message_Block_Index; | |
| 34 | + int Message_Block_Index; /* Index into message block array */ | |
| 37 | 35 | uint8_t Message_Block[64]; /* 512-bit message blocks */ |
| 38 | 36 | |
| 39 | 37 | int Computed; /* Is the digest computed? */ |
| 40 | 38 | int Corrupted; /* Is the message digest corrupted? */ |
| 41 | 39 | }; |
| 42 | 40 |
| --- src/sha1.c | |
| +++ src/sha1.c | |
| @@ -11,11 +11,10 @@ | |
| 11 | * If you do not have the ISO standard stdint.h header file, then you |
| 12 | * must typdef the following: |
| 13 | * name meaning |
| 14 | * uint32_t unsigned 32 bit integer |
| 15 | * uint8_t unsigned 8 bit integer (i.e., unsigned char) |
| 16 | * int_least16_t integer of >= 16 bits |
| 17 | * |
| 18 | */ |
| 19 | #define SHA1HashSize 20 |
| 20 | #define shaSuccess 0 |
| 21 | #define shaInputTooLong 1 |
| @@ -30,12 +29,11 @@ | |
| 30 | uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */ |
| 31 | |
| 32 | uint32_t Length_Low; /* Message length in bits */ |
| 33 | uint32_t Length_High; /* Message length in bits */ |
| 34 | |
| 35 | /* Index into message block array */ |
| 36 | int_least16_t Message_Block_Index; |
| 37 | uint8_t Message_Block[64]; /* 512-bit message blocks */ |
| 38 | |
| 39 | int Computed; /* Is the digest computed? */ |
| 40 | int Corrupted; /* Is the message digest corrupted? */ |
| 41 | }; |
| 42 |
| --- src/sha1.c | |
| +++ src/sha1.c | |
| @@ -11,11 +11,10 @@ | |
| 11 | * If you do not have the ISO standard stdint.h header file, then you |
| 12 | * must typdef the following: |
| 13 | * name meaning |
| 14 | * uint32_t unsigned 32 bit integer |
| 15 | * uint8_t unsigned 8 bit integer (i.e., unsigned char) |
| 16 | * |
| 17 | */ |
| 18 | #define SHA1HashSize 20 |
| 19 | #define shaSuccess 0 |
| 20 | #define shaInputTooLong 1 |
| @@ -30,12 +29,11 @@ | |
| 29 | uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */ |
| 30 | |
| 31 | uint32_t Length_Low; /* Message length in bits */ |
| 32 | uint32_t Length_High; /* Message length in bits */ |
| 33 | |
| 34 | int Message_Block_Index; /* Index into message block array */ |
| 35 | uint8_t Message_Block[64]; /* 512-bit message blocks */ |
| 36 | |
| 37 | int Computed; /* Is the digest computed? */ |
| 38 | int Corrupted; /* Is the message digest corrupted? */ |
| 39 | }; |
| 40 |