{"thread":{"id":"204","subject":"zlib version, list archives","startedAt":"2005-04-21T17:19:32Z","lastAt":"2005-04-21T23:27:57Z","messageCount":3,"participants":["Joel Schopp","Randy.Dunlap","David A. Wheeler"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"1149","messageId":"4267E0A4.40506@austin.ibm.com","threadId":"204","inReplyTo":null,"subject":"zlib version, list archives","fromName":"Joel Schopp","fromEmail":"jschopp@austin.ibm.com","sentAt":"2005-04-21T17:19:32Z","receivedAt":"2005-04-21T17:19:32Z","isPatch":false,"sender":{"key":"jschopp@austin.ibm.com","avatar":null},"body":"I downloaded git-pasky 0.6.2.  I cannot compile it because my zlib \nversion is 1.1.4 and git-pasky relies on function deflateBound() which \nwasn't introduced until zlib version 1.2.x  Is there a patch out there \nto work around this and maybe conditionally compile based on the zlib \nversion?\n\nI apologize in advance if this has already been asked, I cannot find an \narchive of this list.  Could somebody point me to one?\n\n"},{"id":"1150","messageId":"20050421102552.544c70fd.rddunlap@osdl.org","threadId":"204","inReplyTo":"4267E0A4.40506@austin.ibm.com","subject":"Re: zlib version, list archives","fromName":"Randy.Dunlap","fromEmail":"rddunlap@osdl.org","sentAt":"2005-04-21T17:25:52Z","receivedAt":"2005-04-21T17:25:52Z","isPatch":false,"sender":{"key":"rddunlap@osdl.org","avatar":null},"body":"On Thu, 21 Apr 2005 12:19:32 -0500 Joel Schopp wrote:\n\n| I downloaded git-pasky 0.6.2.  I cannot compile it because my zlib \n| version is 1.1.4 and git-pasky relies on function deflateBound() which \n| wasn't introduced until zlib version 1.2.x  Is there a patch out there \n| to work around this and maybe conditionally compile based on the zlib \n| version?\n| \n| I apologize in advance if this has already been asked, I cannot find an \n| archive of this list.  Could somebody point me to one?\n\nhttp://marc.theaimsgroup.com/?l=git\nor\nhttp://dir.gmane.org/gmane.comp.version-control.git\n\n---\n~Randy\n"},{"id":"1220","messageId":"426836FD.8070708@dwheeler.com","threadId":"204","inReplyTo":"20050421102552.544c70fd.rddunlap@osdl.org","subject":"Porting to old zlib (deflateBound) & old mktemp (e.g., Red Hat Linux 9)","fromName":"David A. Wheeler","fromEmail":"dwheeler@dwheeler.com","sentAt":"2005-04-21T23:27:57Z","receivedAt":"2005-04-21T23:27:57Z","isPatch":false,"sender":{"key":"dwheeler@dwheeler.com","avatar":"https://avatars.githubusercontent.com/u/813150?v=4"},"body":"On Thu, 21 Apr 2005 12:19:32 -0500 Joel Schopp wrote:\n\n>| I downloaded git-pasky 0.6.2.  I cannot compile it because my zlib \n>| version is 1.1.4 and git-pasky relies on function deflateBound() which \n>| wasn't introduced until zlib version 1.2.x  Is there a patch out there \n>| to work around this and maybe conditionally compile based on the zlib \n>| version?\n>  \n>\nHere's a quick (read: nasty, dreadful) hack to port git\nto older systems like Red Hat Linux 9 which have old versions\nof zlib & mktemp. Someone who actually spent two seconds\non this can no doubt give you a better solution, but it \"worked for me\".\n\nEdit sha1_file.c, and change the line:\n size = deflateBound(&stream, len);\nto\n size = len + 1024; /* 1024=emergency extra space */\nThe \"deflateBound\" call just finds out the maximum amount of allocation \nspace.\nThe documentation says that \"deflateBound() may return a\nconservative value that may be larger than /sourceLen/\" in certain cases,\nwhich worried me. So to be safe I just added a big pile of excess space \nto \"len\";\nI suspect that \"size = len\" is sufficient but I didn't investigate it.\n\nIf you're trying to get this to work on Red Hat Linux 9, you'll\nhave another problem too: old versions of \"mktemp\"\ndon't support the \"-t\" option. Other old distributions will\nhave the same problem.  To find these cases, do:\n grep \"mktemp.*-t\" *\nand edit all the files to remove the \"-t\" option from mktemp.\nThat's the bare minimum to make it work; a much\ncleaner solution would to specify the tempdir, e.g.,:\n mktemp ${TMPDIR:-/tmp/}gitci.XXXXX\nor even more portably, write the shell code to set TMPDIR to \"/tmp\"\nlocally if it's not set, then use $TMPDIR everywhere.\n\nNot a good final solution, but enough to get started in the interim.\nIn long term, this should be made more portable, but it's\nonly ~2 weeks old after all.  Some people are trying to fly this plane\nto transport a buffalo herd, while others are working to attach the \nwings :-).\n\n--- David A. Wheeler\n\n"}]}