releasing/blocks/cclient/patches/linux/dpkg-posix.patch
changeset 632 934f9131337b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/releasing/blocks/cclient/patches/linux/dpkg-posix.patch	Thu Sep 02 15:02:14 2010 +0800
@@ -0,0 +1,21 @@
+
+--- archives.c.orig	2009-01-25 17:47:54.539050000 +0100
++++ archives.c	2009-01-25 17:49:48.270450000 +0100
+@@ -1177,9 +1177,14 @@
+   varbufinit(&fnametmpvb);
+   varbufinit(&fnamenewvb);
+ 
+-  varbufaddstr(&fnamevb,instdir); varbufaddc(&fnamevb,'/');
+-  varbufaddstr(&fnametmpvb,instdir); varbufaddc(&fnametmpvb,'/');
+-  varbufaddstr(&fnamenewvb,instdir); varbufaddc(&fnamenewvb,'/');
++  // Workaround for POSIX. POSIX says paths that begin with
++  // '//' have implementation-dependent behaviour.
++  // See also:
++  // http://www.opengroup.org/onlinepubs/9699919799/ \
++  //   basedefs/V1_chap03.html#tag_03_266
++  varbufaddstr(&fnamevb,instdir); varbufaddstr(&fnamevb,"///");
++  varbufaddstr(&fnametmpvb,instdir); varbufaddstr(&fnametmpvb,"///");
++  varbufaddstr(&fnamenewvb,instdir); varbufaddstr(&fnamenewvb,"///");
+   fnameidlu= fnamevb.used;
+ 
+   ensure_diversions();