Win32 BYTE_ORDER
This patch adds a #define for BYTE_ORDER to win32.h if it's not pulled
in elsewhere, as needed by msvc build of pgcrypto. Seems several other
platforms define it in their port file already, but not win32.
//Magnus
Attachments:
win32_endian.diffapplication/octet-stream; name=win32_endian.diffDownload
Index: src\include\port/win32.h
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/src/include/port/win32.h,v
retrieving revision 1.62
diff -c -r1.62 win32.h
*** src\include\port/win32.h 4 Oct 2006 00:30:10 -0000 1.62
--- src\include\port/win32.h 19 Oct 2006 19:02:41 -0000
***************
*** 289,294 ****
--- 289,297 ----
#define isnan(x) _isnan(x)
#define finite(x) _finite(x)
+ #ifndef BYTE_ORDER
+ #define BYTE_ORDER LITTLE_ENDIAN
+ #endif
/* Pulled from Makefile.port in mingw */
#define DLSUFFIX ".dll"
"Magnus Hagander" <mha@sollentuna.net> writes:
This patch adds a #define for BYTE_ORDER to win32.h if it's not pulled
in elsewhere, as needed by msvc build of pgcrypto. Seems several other
platforms define it in their port file already, but not win32.
Done, but I think you forgot the defs for LITTLE_ENDIAN and friends
... it seems unlikely that a platform would provide those and then
forget BYTE_ORDER.
regards, tom lane
This patch adds a #define for BYTE_ORDER to win32.h if it's
not pulled
in elsewhere, as needed by msvc build of pgcrypto. Seems
several other
platforms define it in their port file already, but not win32.
Done, but I think you forgot the defs for LITTLE_ENDIAN and
friends ... it seems unlikely that a platform would provide
those and then forget BYTE_ORDER.
Well, it compiled just fine, so it must've found it somewhere :-)
//Magnus
"Magnus Hagander" <mha@sollentuna.net> writes:
Done, but I think you forgot the defs for LITTLE_ENDIAN and
friends ... it seems unlikely that a platform would provide
those and then forget BYTE_ORDER.
Well, it compiled just fine, so it must've found it somewhere :-)
I think the #if tests probably reduced to 0 == 0 ... so my bet is
it compiled but didn't work.
regards, tom lane