diff options
author | Marc G. Fournier <scrappy@hub.org> | 1997-05-26 00:26:56 +0000 |
---|---|---|
committer | Marc G. Fournier <scrappy@hub.org> | 1997-05-26 00:26:56 +0000 |
commit | cf88367751601df5a5bb38f416021bd532cb630c (patch) | |
tree | 56be1fa3a674584ffdd71ad9fa25aa1dc6c8ffed /src/backend | |
parent | ca746f512dc0ca40d9f33b9019a21c5317a88d02 (diff) | |
download | postgresql-cf88367751601df5a5bb38f416021bd532cb630c.tar.gz postgresql-cf88367751601df5a5bb38f416021bd532cb630c.zip |
From: David Friend <dfriend@atlsci.atlsci.com>
Subject: [PATCHES] pqcomprim.c patch
This is the patch by Robert Bruccoleri to fix the endian problem.
(Actually, it's the reverse of his patch. He must have gotten the
order wrong.)
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/libpq/pqcomprim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/libpq/pqcomprim.c b/src/backend/libpq/pqcomprim.c index d10be39d817..00177da4416 100644 --- a/src/backend/libpq/pqcomprim.c +++ b/src/backend/libpq/pqcomprim.c @@ -28,7 +28,7 @@ # define ntoh_l(n) (u_long)(((u_char *)&n)[0] << 24 | \ ((u_char *)&n)[1] << 16 | \ ((u_char *)&n)[2] << 8 | ((u_char *)&n)[3]) -# define hton_s(n) (ntoh_s(n)) +# define hton_s(n) (u_short)(((u_char *) &n)[2] << 8 | ((u_char *) &n)[3]) # define hton_l(n) (ntoh_l(n)) # else /* BYTE_ORDER != BIG_ENDIAN */ # if BYTE_ORDER == PDP_ENDIAN |