Commit 1d0085e4 authored by Bruce Momjian's avatar Bruce Momjian

Dec alphaserver patch from Malcolm Beattie

parent fe54c54d
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#if BYTE_ORDER == BIG_ENDIAN #if BYTE_ORDER == BIG_ENDIAN
#define ntoh_s(n) (u_short)(((u_char *)&n)[1] << 8 \ #define ntoh_s(n) (u_short)(((u_char *)&n)[1] << 8 \
| ((u_char *)&n)[0]) | ((u_char *)&n)[0])
#define ntoh_l(n) (u_long) (((u_char *)&n)[3] << 24 \ #define ntoh_l(n) (uint32) (((u_char *)&n)[3] << 24 \
| ((u_char *)&n)[2] << 16 \ | ((u_char *)&n)[2] << 16 \
| ((u_char *)&n)[1] << 8 \ | ((u_char *)&n)[1] << 8 \
| ((u_char *)&n)[0]) | ((u_char *)&n)[0])
...@@ -65,10 +65,10 @@ int ...@@ -65,10 +65,10 @@ int
pqPutLong(int integer, FILE *f) pqPutLong(int integer, FILE *f)
{ {
int retval = 0; int retval = 0;
u_long n; uint32 n;
n = hton_l(integer); n = hton_l(integer);
if (fwrite(&n, sizeof(u_long), 1, f) != 1) if (fwrite(&n, sizeof(uint32), 1, f) != 1)
retval = EOF; retval = EOF;
return retval; return retval;
...@@ -93,9 +93,9 @@ int ...@@ -93,9 +93,9 @@ int
pqGetLong(int *result, FILE *f) pqGetLong(int *result, FILE *f)
{ {
int retval = 0; int retval = 0;
u_long n; uint32 n;
if (fread(&n, sizeof(u_long), 1, f) != 1) if (fread(&n, sizeof(uint32), 1, f) != 1)
retval = EOF; retval = EOF;
*result = ntoh_l(n); *result = ntoh_l(n);
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
int int
inet_aton(const char *cp, struct in_addr * addr) inet_aton(const char *cp, struct in_addr * addr)
{ {
register u_long val; register uint32 val;
register int base, register int base,
n; n;
register char c; register char c;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment