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

Commite578c17

Browse files
committed
Fix compilation warning in unicode_norm.c
80f8eb7 has introduced in unicode_norm.c some new code that useshtonl(). On at least some FreeBSD environments, it is possible to findthat this function is undeclared, causing a compilation warning. It isworth noting that no buildfarm members have reported this issue.Instead of adding a new inclusion to arpa/inet.h, switch to usethe equivalent defined in pg_bswap.h, to benefit from any built-infunction if the compiler has one.Reported-by: Masahiko SawadaDiscussion:https://postgr.es/m/CA+fd4k7D4b12ShywWj=AbcHZzV1-OqMjNe7RZAu+tgz5rd_11A@mail.gmail.com
1 parentf0f13a3 commite578c17

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/common/unicode_norm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#ifndefFRONTEND
2424
#include"common/unicode_normprops_table.h"
2525
#endif
26+
#include"port/pg_bswap.h"
2627

2728
#ifndefFRONTEND
2829
#defineALLOC(size) palloc(size)
@@ -475,7 +476,7 @@ qc_hash_lookup(pg_wchar ch, const pg_unicode_norminfo *norminfo)
475476
* Compute the hash function. The hash key is the codepoint with the bytes
476477
* in network order.
477478
*/
478-
hashkey=htonl(ch);
479+
hashkey=pg_hton32(ch);
479480
h=norminfo->hash(&hashkey);
480481

481482
/* An out-of-range result implies no match */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp