Amit, > Today when I tried to build the latest code on my windows m/c, I got few > errors from the checkin of this patch. > > lo_hton64 (due to -- unint32_t) > .\src\interfaces\libpq\fe-lobj.c(1049) : error C2065: 'uint32_t' : > undeclared identifier > inv_seek (due to -- MAX_LARGE_OBJECT_SIZE) > \src\backend\storage\large_object\inv_api.c(389) : error C2065: 'LOBLKSIZELL' > : undeclared identifier > inv_read ((due to -- MAX_LARGE_OBJECT_SIZE)) > \src\backend\storage\large_object\inv_api.c(441) : error C2065: 'LOBLKSIZELL' > : undeclared identifier
Thanks for the report. Can you please try included patch? -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese: http://www.sraoss.co.jp
diff --git a/src/include/storage/large_object.h b/src/include/storage/large_object.h new file mode 100644 index 52f01c6..715f0c3 *** a/src/include/storage/large_object.h --- b/src/include/storage/large_object.h *************** typedef struct LargeObjectDesc *** 65,71 **** /* * Maximum byte length for each large object */ ! #define MAX_LARGE_OBJECT_SIZE INT64CONST(INT_MAX * LOBLKSIZE) /* * Function definitions... --- 65,71 ---- /* * Maximum byte length for each large object */ ! #define MAX_LARGE_OBJECT_SIZE ((int64)INT_MAX * LOBLKSIZE) /* * Function definitions... diff --git a/src/interfaces/libpq/fe-lobj.c b/src/interfaces/libpq/fe-lobj.c new file mode 100644 index fb17ac8..022cfec *** a/src/interfaces/libpq/fe-lobj.c --- b/src/interfaces/libpq/fe-lobj.c *************** static pg_int64 *** 1046,1058 **** lo_hton64(pg_int64 host64) { pg_int64 result; ! uint32_t h32, l32; /* High order half first, since we're doing MSB-first */ ! h32 = (uint32_t) (host64 >> 32); /* Now the low order half */ ! l32 = (uint32_t) (host64 & 0xffffffff); result = htonl(l32); result <<= 32; --- 1046,1058 ---- lo_hton64(pg_int64 host64) { pg_int64 result; ! uint32 h32, l32; /* High order half first, since we're doing MSB-first */ ! h32 = (uint32) (host64 >> 32); /* Now the low order half */ ! l32 = (uint32) (host64 & 0xffffffff); result = htonl(l32); result <<= 32; *************** static pg_int64 *** 1069,1078 **** lo_ntoh64(pg_int64 net64) { pg_int64 result; ! uint32_t h32, l32; ! l32 = (uint32_t) (net64 >> 32); ! h32 = (uint32_t) (net64 & 0xffffffff); result = ntohl(h32); result <<= 32; --- 1069,1078 ---- lo_ntoh64(pg_int64 net64) { pg_int64 result; ! uint32 h32, l32; ! l32 = (uint32) (net64 >> 32); ! h32 = (uint32) (net64 & 0xffffffff); result = ntohl(h32); result <<= 32;
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers