summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--mpi/mpi-div.c7
-rw-r--r--random/rndunix.c4
-rw-r--r--random/rndw32.c4
-rw-r--r--random/rndw32ce.c2
-rw-r--r--src/mpi.h4
-rw-r--r--src/types.h6
7 files changed, 11 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index 4d4fb49a..57884162 100644
--- a/configure.ac
+++ b/configure.ac
@@ -834,7 +834,6 @@ AC_TYPE_PID_T
GNUPG_CHECK_TYPEDEF(byte, HAVE_BYTE_TYPEDEF)
GNUPG_CHECK_TYPEDEF(ushort, HAVE_USHORT_TYPEDEF)
-GNUPG_CHECK_TYPEDEF(ulong, HAVE_ULONG_TYPEDEF)
GNUPG_CHECK_TYPEDEF(u16, HAVE_U16_TYPEDEF)
GNUPG_CHECK_TYPEDEF(u32, HAVE_U32_TYPEDEF)
diff --git a/mpi/mpi-div.c b/mpi/mpi-div.c
index 9ac99c31..eb621fe4 100644
--- a/mpi/mpi-div.c
+++ b/mpi/mpi-div.c
@@ -64,8 +64,9 @@ _gcry_mpi_fdiv_r( gcry_mpi_t rem, gcry_mpi_t dividend, gcry_mpi_t divisor )
* rem is optional
*/
-ulong
-_gcry_mpi_fdiv_r_ui( gcry_mpi_t rem, gcry_mpi_t dividend, ulong divisor )
+unsigned long
+_gcry_mpi_fdiv_r_ui( gcry_mpi_t rem, gcry_mpi_t dividend,
+ unsigned long divisor )
{
mpi_limb_t rlimb;
@@ -321,7 +322,7 @@ _gcry_mpi_tdiv_q_2exp( gcry_mpi_t w, gcry_mpi_t u, unsigned int count )
* (note: divisor must fit into a limb)
*/
int
-_gcry_mpi_divisible_ui(gcry_mpi_t dividend, ulong divisor )
+_gcry_mpi_divisible_ui(gcry_mpi_t dividend, unsigned long divisor )
{
return !_gcry_mpih_mod_1( dividend->d, dividend->nlimbs, divisor );
}
diff --git a/random/rndunix.c b/random/rndunix.c
index fcb45b78..aff2f85d 100644
--- a/random/rndunix.c
+++ b/random/rndunix.c
@@ -894,7 +894,7 @@ _gcry_rndunix_gather_random (void (*add)(const void*, size_t,
/* now read from the gatherer */
while( length ) {
int goodness;
- ulong subtract;
+ unsigned long subtract;
if( read_a_msg( pipedes[0], &msg ) ) {
log_error("reading from gatherer pipe failed: %s\n",
@@ -928,7 +928,7 @@ _gcry_rndunix_gather_random (void (*add)(const void*, size_t,
(*add)( msg.data, n, origin );
/* this is the trick how we cope with the goodness */
- subtract = (ulong)n * goodness / 100;
+ subtract = (unsigned long)n * goodness / 100;
/* subtract at least 1 byte to avoid infinite loops */
length -= subtract ? subtract : 1;
}
diff --git a/random/rndw32.c b/random/rndw32.c
index 08a8867d..b3f63d20 100644
--- a/random/rndw32.c
+++ b/random/rndw32.c
@@ -845,10 +845,10 @@ _gcry_rndw32_gather_random_fast (void (*add)(const void*, size_t,
We discard the upper 32-bit of those values. */
{
- byte buffer[20*sizeof(ulong)], *bufptr;
+ byte buffer[20*sizeof(unsigned long)], *bufptr;
bufptr = buffer;
-#define ADDINT(f) do { ulong along = (ulong)(f); \
+#define ADDINT(f) do { unsigned long along = (unsigned long)(f); \
memcpy (bufptr, &along, sizeof (along) ); \
bufptr += sizeof (along); \
} while (0)
diff --git a/random/rndw32ce.c b/random/rndw32ce.c
index b485eef2..873e8460 100644
--- a/random/rndw32ce.c
+++ b/random/rndw32ce.c
@@ -115,7 +115,7 @@ _gcry_rndw32ce_gather_random_fast (void (*add)(const void*, size_t,
memcpy (bufptr, &along, sizeof (along)); \
bufptr += sizeof (along); \
} while (0)
- unsigned char buffer[20*sizeof(ulong)], *bufptr;
+ unsigned char buffer[20*sizeof(unsigned long)], *bufptr;
bufptr = buffer;
ADD (HWND, GetActiveWindow ());
diff --git a/src/mpi.h b/src/mpi.h
index c342ff48..39312fc3 100644
--- a/src/mpi.h
+++ b/src/mpi.h
@@ -182,14 +182,14 @@ gpg_err_code_t _gcry_mpi_to_octet_string (unsigned char **r_frame,
#define mpi_tdiv_q_2exp(a,b,c) _gcry_mpi_tdiv_q_2exp((a),(b),(c))
#define mpi_divisible_ui(a,b) _gcry_mpi_divisible_ui((a),(b))
-ulong _gcry_mpi_fdiv_r_ui( gcry_mpi_t rem, gcry_mpi_t dividend, ulong divisor );
+unsigned long _gcry_mpi_fdiv_r_ui( gcry_mpi_t rem, gcry_mpi_t dividend, unsigned long divisor );
void _gcry_mpi_fdiv_r( gcry_mpi_t rem, gcry_mpi_t dividend, gcry_mpi_t divisor );
void _gcry_mpi_fdiv_q( gcry_mpi_t quot, gcry_mpi_t dividend, gcry_mpi_t divisor );
void _gcry_mpi_fdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t dividend, gcry_mpi_t divisor );
void _gcry_mpi_tdiv_r( gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t den);
void _gcry_mpi_tdiv_qr( gcry_mpi_t quot, gcry_mpi_t rem, gcry_mpi_t num, gcry_mpi_t den);
void _gcry_mpi_tdiv_q_2exp( gcry_mpi_t w, gcry_mpi_t u, unsigned count );
-int _gcry_mpi_divisible_ui(gcry_mpi_t dividend, ulong divisor );
+int _gcry_mpi_divisible_ui(gcry_mpi_t dividend, unsigned long divisor );
/*-- mpi-mod.c --*/
diff --git a/src/types.h b/src/types.h
index 645ddd62..39393be1 100644
--- a/src/types.h
+++ b/src/types.h
@@ -70,12 +70,6 @@
# define HAVE_USHORT_TYPEDEF
#endif
-#ifndef HAVE_ULONG_TYPEDEF
-# undef ulong /* In case there is a macro with that name. */
- typedef unsigned long ulong;
-# define HAVE_ULONG_TYPEDEF
-#endif
-
#ifndef HAVE_U16_TYPEDEF
# undef u16 /* In case there is a macro with that name. */
# if SIZEOF_UNSIGNED_INT == 2