Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite4dccfd

Browse files
committed
From: t-ishii@sra.co.jp
6.3 postmaster is supposed to work with pre 6.3 protocol. This is truefor little endian architecture servers. But for big endian machinessuch as Sparc the backward compatibility function do not work.Attached are patches to fix the problem.
1 parentb64a754 commite4dccfd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎src/backend/libpq/pqcomprim.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,20 @@
3434
#else
3535
#ifBYTE_ORDER==BIG_ENDIAN
3636

37+
/*
3738
#define ntoh_s(n)(uint16)(((u_char *)&n)[1] << 8 \
3839
| ((u_char *)&n)[0])
3940
#define ntoh_l(n)(uint32)(((u_char *)&n)[3] << 24 \
4041
| ((u_char *)&n)[2] << 16 \
4142
| ((u_char *)&n)[1] << 8 \
4243
| ((u_char *)&n)[0])
44+
*/
45+
#definentoh_s(n)(uint16)((((uint16)n & 0x00ff) << 8) | \
46+
(((uint16)n & 0xff00) >> 8))
47+
#definentoh_l(n)(uint32)((((uint32)n & 0x000000ff) << 24) | \
48+
(((uint32)n & 0x0000ff00) << 8) | \
49+
(((uint32)n & 0x00ff0000) >> 8) | \
50+
(((uint32)n & 0xff000000) >> 24))
4351
#definehton_s(n)(ntoh_s(n))
4452
#definehton_l(n)(ntoh_l(n))
4553

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp