]> granicus.if.org Git - postgresql/commitdiff
Dec alphaserver patch from Malcolm Beattie
authorBruce Momjian <bruce@momjian.us>
Fri, 12 Sep 1997 22:22:12 +0000 (22:22 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 12 Sep 1997 22:22:12 +0000 (22:22 +0000)
src/backend/libpq/pqcomprim.c
src/backend/port/inet_aton.c

index 594bb2b98ade0c5afa8bc6e0535c8eb1992fff0d..a3bdd26c0ed85ca758d01de2f6d20d21a3768793 100644 (file)
@@ -27,7 +27,7 @@
 #if BYTE_ORDER == BIG_ENDIAN
 #define ntoh_s(n) (u_short)(((u_char *)&n)[1] << 8 \
                                                          | ((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)[1] <<  8 \
                                                          | ((u_char *)&n)[0])
@@ -65,10 +65,10 @@ int
 pqPutLong(int integer, FILE *f)
 {
        int                     retval = 0;
-       u_long          n;
+       uint32          n;
 
        n = hton_l(integer);
-       if (fwrite(&n, sizeof(u_long), 1, f) != 1)
+       if (fwrite(&n, sizeof(uint32), 1, f) != 1)
                retval = EOF;
 
        return retval;
@@ -93,9 +93,9 @@ int
 pqGetLong(int *result, FILE *f)
 {
        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;
 
        *result = ntoh_l(n);
index f1283e6e6b6af5cb576574de984de5e0b9f4d6a1..0220507a5237a394107b390c464bf9c0d0c1d25a 100644 (file)
@@ -57,7 +57,7 @@
 int
 inet_aton(const char *cp, struct in_addr * addr)
 {
-       register u_long val;
+       register uint32 val;
        register int base,
                                n;
        register char c;