Skip to content

Commit cf88367

Browse files
committed
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.)
1 parent ca746f5 commit cf88367

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/libpq/pqcomprim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# define ntoh_l(n) (u_long)(((u_char *)&n)[0] << 24 | \
2929
((u_char *)&n)[1] << 16 | \
3030
((u_char *)&n)[2] << 8 | ((u_char *)&n)[3])
31-
# define hton_s(n) (ntoh_s(n))
31+
# define hton_s(n) (u_short)(((u_char *) &n)[2] << 8 | ((u_char *) &n)[3])
3232
# define hton_l(n) (ntoh_l(n))
3333
# else /* BYTE_ORDER != BIG_ENDIAN */
3434
# if BYTE_ORDER == PDP_ENDIAN

0 commit comments

Comments
 (0)