{"thread":{"id":"3637","subject":"[BUG] imap-send.c fails to build on OSX","startedAt":"2006-03-12T14:44:08Z","lastAt":"2006-03-13T05:03:38Z","messageCount":5,"participants":["Randal L. Schwartz","Shawn Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"17471","messageId":"863bhnlo3r.fsf@blue.stonehenge.com","threadId":"3637","inReplyTo":null,"subject":"[BUG] imap-send.c fails to build on OSX","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2006-03-12T14:44:08Z","receivedAt":"2006-03-12T14:44:08Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":"\n    gcc -o imap-send.o -c -g -O2 -Wall -I/sw/include -I/opt/local/include -DSHA1_HEADER='<openssl/sha.h>'  imap-send.c\n    imap-send.c:376: error: static declaration of 'vasprintf' follows non-static declaration\n    /usr/include/stdio.h:297: error: previous declaration of 'vasprintf' was here\n    make: *** [imap-send.o] Error 1\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"17478","messageId":"86k6azjxb3.fsf@blue.stonehenge.com","threadId":"3637","inReplyTo":"863bhnlo3r.fsf@blue.stonehenge.com","subject":"Re: [BUG] imap-send.c fails to build on OSX","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2006-03-12T19:08:16Z","receivedAt":"2006-03-12T19:08:16Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Randal\" == Randal L Schwartz <merlyn@stonehenge.com> writes:\n\nRandal>     gcc -o imap-send.o -c -g -O2 -Wall -I/sw/include -I/opt/local/include -DSHA1_HEADER='<openssl/sha.h>'  imap-send.c\nRandal>     imap-send.c:376: error: static declaration of 'vasprintf' follows non-static declaration\nRandal>     /usr/include/stdio.h:297: error: previous declaration of 'vasprintf' was here\nRandal>     make: *** [imap-send.o] Error 1\n\nBy the way, /usr/include/stdio.h near the line in question looks like:\n\nint      vasprintf(char **, const char *, va_list) __DARWIN_LDBL_COMPAT(vasprintf);\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"17499","messageId":"20060313042552.GA18136@spearce.org","threadId":"3637","inReplyTo":"863bhnlo3r.fsf@blue.stonehenge.com","subject":"Re: [BUG] imap-send.c fails to build on OSX","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-03-13T04:25:52Z","receivedAt":"2006-03-13T04:25:52Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Workarounds for compiling on MacOS X.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n\n---\n \"Randal L. Schwartz\" <merlyn@stonehenge.com> wrote:\n > \n >     gcc -o imap-send.o -c -g -O2 -Wall -I/sw/include -I/opt/local/include -DSHA1_HEADER='<openssl/sha.h>'  imap-send.c\n >     imap-send.c:376: error: static declaration of 'vasprintf' follows non-static declaration\n >     /usr/include/stdio.h:297: error: previous declaration of 'vasprintf' was here\n >     make: *** [imap-send.o] Error 1\n\n This should fix the build issues on Mac OS X.  Not tested on other\n (possibly) more important platforms, like Linux.  :-)\n\n generate-cmdlist.sh |    2 +-\n imap-send.c         |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\nbase 57f4a482a7fc31e31cafd31fe23f4a4779b2c2f0\nlast 6854050e1cdaf1b7ab352e1d4757ff5b29a5db93\ndiff --git a/generate-cmdlist.sh b/generate-cmdlist.sh\nindex 6ee85d5..76ba49c 100755\n--- a/generate-cmdlist.sh\n+++ b/generate-cmdlist.sh\n@@ -42,7 +42,7 @@ EOF\n while read cmd\n do\n     sed -n \"/NAME/,/git-$cmd/H;\n-\t    \\$ {x; s/.*git-$cmd - \\\\(.*\\\\)/  {\\\"$cmd\\\", \\\"\\1\\\"},/; p}\" \\\n+\t    \\$ {x; s/.*git-$cmd - \\\\(.*\\\\)/  {\\\"$cmd\\\", \\\"\\1\\\"},/; p;}\" \\\n \t\"Documentation/git-$cmd.txt\"\n done\n echo \"};\"\ndiff --git a/imap-send.c b/imap-send.c\nindex fddaac0..376929f 100644\n--- a/imap-send.c\n+++ b/imap-send.c\n@@ -370,7 +370,7 @@ free_generic_messages( message_t *msgs )\n \t}\n }\n \n-static int\n+int\n vasprintf( char **strp, const char *fmt, va_list ap )\n {\n \tint len;\n-- \n1.2.4.g806b\n"},{"id":"17500","messageId":"86zmjvhsru.fsf@blue.stonehenge.com","threadId":"3637","inReplyTo":"20060313042552.GA18136@spearce.org","subject":"Re: [BUG] imap-send.c fails to build on OSX","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2006-03-13T04:29:09Z","receivedAt":"2006-03-13T04:29:09Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Shawn\" == Shawn Pearce <spearce@spearce.org> writes:\n\nShawn> Workarounds for compiling on MacOS X.\nShawn> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>\n\nShawn>  This should fix the build issues on Mac OS X.  Not tested on other\nShawn>  (possibly) more important platforms, like Linux.  :-)\n\nMy C is a bit rusty, but wouldn't that provide a definition for vasprintf when\nthe libc is *also* providing a definition?  Might that not also break other\napps that want to link with this?\n\nMaybe the right solution is to rename this local implementation so that it\ncan't conflict, like \"git_vasprintf\", or to include it only when the libc\ndoesn't provide it.\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"17503","messageId":"20060313050338.GA18154@spearce.org","threadId":"3637","inReplyTo":"86zmjvhsru.fsf@blue.stonehenge.com","subject":"Re: [BUG] imap-send.c fails to build on OSX","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-03-13T05:03:38Z","receivedAt":"2006-03-13T05:03:38Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Randal L. Schwartz\" <merlyn@stonehenge.com> wrote:\n> >>>>> \"Shawn\" == Shawn Pearce <spearce@spearce.org> writes:\n> \n> Shawn> Workarounds for compiling on MacOS X.\n> Shawn> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>\n> \n> Shawn>  This should fix the build issues on Mac OS X.  Not tested on other\n> Shawn>  (possibly) more important platforms, like Linux.  :-)\n> \n> My C is a bit rusty, but wouldn't that provide a definition for vasprintf when\n> the libc is *also* providing a definition?  Might that not also break other\n> apps that want to link with this?\n> \n> Maybe the right solution is to rename this local implementation so that it\n> can't conflict, like \"git_vasprintf\", or to include it only when the libc\n> doesn't provide it.\n\nYour right.  But I figured it wasn't a big deal since this is just\nan application and not library code.  Nobody should be linking\nagainst it.\n\nPerhaps the better solution is to rename the provided implementation\nto git_; maybe even better to move it off to the compat library\narea where other should-have-been-provided-by-the-OS definitions are.\n\n-- \nShawn.\n"}]}