head 1.3; access; symbols OPENPKG_E1_MP:1.1 OPENPKG_2_STABLE_MP:1.1 OPENPKG_2_STABLE:1.1.0.2 OPENPKG_E1_MP_HEAD:1.1; locks; strict; comment @# @; 1.3 date 2008.07.17.08.00.09; author rse; state Exp; branches; next 1.2; commitid xr4EJNOBa3GEa8bt; 1.2 date 2007.05.19.20.07.58; author rse; state dead; branches; next 1.1; commitid U833LzGM4bHjRzis; 1.1 date 2007.01.01.18.47.47; author rse; state Exp; branches 1.1.2.1; next ; commitid GlF9mvorx5dQQP0s; 1.1.2.1 date 2007.01.01.18.47.47; author thl; state dead; branches; next 1.1.2.2; commitid CAZHOWY4XWAutw2s; 1.1.2.2 date 2007.01.14.21.56.11; author thl; state Exp; branches; next ; commitid CAZHOWY4XWAutw2s; desc @@ 1.3 log @fix run-time under FreeBSD 7/8 @ text @Index: perl/Makefile.PL --- perl/Makefile.PL.orig 2007-01-01 19:13:18 +0100 +++ perl/Makefile.PL 2008-07-17 09:58:04 +0200 @@@@ -61,7 +61,7 @@@@ NO_META => 1, # cruel hack to workaround the conflict between OSSP uuid's # uuid_create() function and one from FreeBSD's libc - (( "$Config{'osname'}$Config{'osvers'}" =~ m/^freebsd[56]\./ + (( "$Config{'osname'}$Config{'osvers'}" =~ m/^freebsd[5-8]\./ and $Config{'ld'} =~ m/cc$/ and -f "/usr/include/uuid.h") ? ( LDDLFLAGS => $Config{'lddlflags'} . ' -Wl,-Bsymbolic') : ()) ); @ 1.2 log @upgrading package: uuid 1.5.1 -> 1.6.0 @ text @d1 12 a12 113 Index: perl/uuid_compat.pm --- perl/uuid_compat.pm 31 Jul 2006 12:45:09 -0000 1.10 +++ perl/uuid_compat.pm 1 Jan 2007 18:14:57 -0000 1.12 @@@@ -84,7 +84,7 @@@@ sub to_b64string { my ($self, $bin) = @@_; - return MIME::Base64::encode_base64($bin); + return MIME::Base64::encode_base64($bin, ''); } sub from_string { Index: pgsql/Makefile --- pgsql/Makefile 31 Jul 2006 12:43:32 -0000 1.3 +++ pgsql/Makefile 20 Nov 2006 19:29:27 -0000 1.4 @@@@ -14,6 +14,7 @@@@ PG_CONFIG ?= pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) +POSTGRES := $(shell $(PG_CONFIG) --bindir)/postgres top_builddir := $(dir $(PGXS))../.. include $(top_builddir)/src/Makefile.global @@@@ -25,6 +26,7 @@@@ override CPPFLAGS := -I.. $(CPPFLAGS) SHLIB_LINK := -L../.libs -luuid SHLIB_LINK += $(shell test $(shell uname -s) = FreeBSD && echo "-Wl,-Bsymbolic") +SHLIB_LINK += $(shell test $(shell uname -s) = Darwin && echo "-bundle_loader $(POSTGRES)") rpath := all: uuid.sql all-lib Index: pgsql/uuid.c --- pgsql/uuid.c 20 Jul 2006 17:21:17 -0000 1.5 +++ pgsql/uuid.c 1 Jan 2007 18:14:58 -0000 1.8 @@@@ -41,6 +41,12 @@@@ #include "lib/stringinfo.h" #include "access/hash.h" +/* PostgreSQL module magic cookie + (PostgreSQL >= 8.2 only) */ +#ifdef PG_MODULE_MAGIC +PG_MODULE_MAGIC; +#endif + /* internal UUID datum data structure */ typedef struct { unsigned char uuid_bin[UUID_LEN_BIN]; @@@@ -78,7 +84,7 @@@@ errmsg("invalid UUID string"))); if ((len = strlen(uuid_str)) != UUID_LEN_STR) ereport(ERROR, (errcode(ERRCODE_DATA_EXCEPTION), - errmsg("invalid UUID string length %d (expected %d)", len, UUID_LEN_STR))); + errmsg("invalid UUID string length %d (expected %d)", (int)len, UUID_LEN_STR))); /* import as string representation */ if ((rc = uuid_create(&uuid)) != UUID_RC_OK) Index: pgsql/uuid.sql.in --- pgsql/uuid.sql.in 31 Jul 2006 12:43:32 -0000 1.5 +++ pgsql/uuid.sql.in 1 Jan 2007 18:14:58 -0000 1.9 @@@@ -32,6 +32,7 @@@@ -- SET search_path TO public; +SET client_min_messages TO warning; DROP FUNCTION uuid_in(CSTRING) CASCADE; DROP FUNCTION uuid_out(uuid) CASCADE; @@@@ -82,12 +83,12 @@@@ CREATE FUNCTION uuid_recv(INTERNAL) RETURNS uuid STRICT - LANGUAGE C AS 'MODULE_PATHNAME', 'pg_uuid_in'; + LANGUAGE C AS 'MODULE_PATHNAME', 'pg_uuid_recv'; CREATE FUNCTION uuid_send(uuid) RETURNS BYTEA STRICT - LANGUAGE C AS 'MODULE_PATHNAME', 'pg_uuid_out'; + LANGUAGE C AS 'MODULE_PATHNAME', 'pg_uuid_send'; CREATE TYPE uuid ( INPUT = uuid_in, -- for SQL input @@@@ -102,11 +103,11 @@@@ COMMENT ON TYPE uuid IS 'UUID type'; -CREATE CAST (CSTRING AS uuid) - WITH FUNCTION uuid_in(CSTRING) AS ASSIGNMENT; - -CREATE CAST (uuid AS CSTRING) - WITH FUNCTION uuid_out(uuid) AS ASSIGNMENT; +-- CREATE CAST (CSTRING AS uuid) +-- WITH FUNCTION uuid_in(CSTRING) AS ASSIGNMENT; +-- +-- CREATE CAST (uuid AS CSTRING) +-- WITH FUNCTION uuid_out(uuid) AS ASSIGNMENT; -- -- the UUID constructor function Index: php/uuid.c --- php/uuid.c 11 May 2006 18:39:13 -0000 1.8 +++ php/uuid.c 1 Jan 2007 18:39:52 -0000 1.10 @@@@ -458,6 +458,10 @@@@ php_error_docref(NULL TSRMLS_CC, E_WARNING, "uuid_export: %s", uuid_error(rc)); RETURN_LONG((long)rc); } + if (fmt == UUID_FMT_SIV) + data_len = strlen((char *)data_ptr); + else if (fmt == UUID_FMT_STR || fmt == UUID_FMT_TXT) + data_len--; /* PHP doesn't wish NUL-termination on strings */ ZVAL_STRINGL(z_data, data_ptr, data_len, 1); free(data_ptr); @ 1.1 log @apply a bunch of bug fixes from my OSSP CVS until I've a newer OSSP uuid version available @ text @@ 1.1.2.1 log @file uuid.patch was added on branch OPENPKG_2_STABLE on 2007-01-14 21:56:10 +0000 @ text @d1 113 @ 1.1.2.2 log @MFC: make up leeway for 2_STABLE by virtue of build-time results @ text @a0 113 Index: perl/uuid_compat.pm --- perl/uuid_compat.pm 31 Jul 2006 12:45:09 -0000 1.10 +++ perl/uuid_compat.pm 1 Jan 2007 18:14:57 -0000 1.12 @@@@ -84,7 +84,7 @@@@ sub to_b64string { my ($self, $bin) = @@_; - return MIME::Base64::encode_base64($bin); + return MIME::Base64::encode_base64($bin, ''); } sub from_string { Index: pgsql/Makefile --- pgsql/Makefile 31 Jul 2006 12:43:32 -0000 1.3 +++ pgsql/Makefile 20 Nov 2006 19:29:27 -0000 1.4 @@@@ -14,6 +14,7 @@@@ PG_CONFIG ?= pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) +POSTGRES := $(shell $(PG_CONFIG) --bindir)/postgres top_builddir := $(dir $(PGXS))../.. include $(top_builddir)/src/Makefile.global @@@@ -25,6 +26,7 @@@@ override CPPFLAGS := -I.. $(CPPFLAGS) SHLIB_LINK := -L../.libs -luuid SHLIB_LINK += $(shell test $(shell uname -s) = FreeBSD && echo "-Wl,-Bsymbolic") +SHLIB_LINK += $(shell test $(shell uname -s) = Darwin && echo "-bundle_loader $(POSTGRES)") rpath := all: uuid.sql all-lib Index: pgsql/uuid.c --- pgsql/uuid.c 20 Jul 2006 17:21:17 -0000 1.5 +++ pgsql/uuid.c 1 Jan 2007 18:14:58 -0000 1.8 @@@@ -41,6 +41,12 @@@@ #include "lib/stringinfo.h" #include "access/hash.h" +/* PostgreSQL module magic cookie + (PostgreSQL >= 8.2 only) */ +#ifdef PG_MODULE_MAGIC +PG_MODULE_MAGIC; +#endif + /* internal UUID datum data structure */ typedef struct { unsigned char uuid_bin[UUID_LEN_BIN]; @@@@ -78,7 +84,7 @@@@ errmsg("invalid UUID string"))); if ((len = strlen(uuid_str)) != UUID_LEN_STR) ereport(ERROR, (errcode(ERRCODE_DATA_EXCEPTION), - errmsg("invalid UUID string length %d (expected %d)", len, UUID_LEN_STR))); + errmsg("invalid UUID string length %d (expected %d)", (int)len, UUID_LEN_STR))); /* import as string representation */ if ((rc = uuid_create(&uuid)) != UUID_RC_OK) Index: pgsql/uuid.sql.in --- pgsql/uuid.sql.in 31 Jul 2006 12:43:32 -0000 1.5 +++ pgsql/uuid.sql.in 1 Jan 2007 18:14:58 -0000 1.9 @@@@ -32,6 +32,7 @@@@ -- SET search_path TO public; +SET client_min_messages TO warning; DROP FUNCTION uuid_in(CSTRING) CASCADE; DROP FUNCTION uuid_out(uuid) CASCADE; @@@@ -82,12 +83,12 @@@@ CREATE FUNCTION uuid_recv(INTERNAL) RETURNS uuid STRICT - LANGUAGE C AS 'MODULE_PATHNAME', 'pg_uuid_in'; + LANGUAGE C AS 'MODULE_PATHNAME', 'pg_uuid_recv'; CREATE FUNCTION uuid_send(uuid) RETURNS BYTEA STRICT - LANGUAGE C AS 'MODULE_PATHNAME', 'pg_uuid_out'; + LANGUAGE C AS 'MODULE_PATHNAME', 'pg_uuid_send'; CREATE TYPE uuid ( INPUT = uuid_in, -- for SQL input @@@@ -102,11 +103,11 @@@@ COMMENT ON TYPE uuid IS 'UUID type'; -CREATE CAST (CSTRING AS uuid) - WITH FUNCTION uuid_in(CSTRING) AS ASSIGNMENT; - -CREATE CAST (uuid AS CSTRING) - WITH FUNCTION uuid_out(uuid) AS ASSIGNMENT; +-- CREATE CAST (CSTRING AS uuid) +-- WITH FUNCTION uuid_in(CSTRING) AS ASSIGNMENT; +-- +-- CREATE CAST (uuid AS CSTRING) +-- WITH FUNCTION uuid_out(uuid) AS ASSIGNMENT; -- -- the UUID constructor function Index: php/uuid.c --- php/uuid.c 11 May 2006 18:39:13 -0000 1.8 +++ php/uuid.c 1 Jan 2007 18:39:52 -0000 1.10 @@@@ -458,6 +458,10 @@@@ php_error_docref(NULL TSRMLS_CC, E_WARNING, "uuid_export: %s", uuid_error(rc)); RETURN_LONG((long)rc); } + if (fmt == UUID_FMT_SIV) + data_len = strlen((char *)data_ptr); + else if (fmt == UUID_FMT_STR || fmt == UUID_FMT_TXT) + data_len--; /* PHP doesn't wish NUL-termination on strings */ ZVAL_STRINGL(z_data, data_ptr, data_len, 1); free(data_ptr); @