{"thread":{"id":"4670","subject":"Solaris 8","startedAt":"2006-06-26T08:09:12Z","lastAt":"2006-06-26T12:13:25Z","messageCount":6,"participants":["Uwe Zeisberger","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"22590","messageId":"20060626080912.GA3646@informatik.uni-freiburg.de","threadId":"4670","inReplyTo":null,"subject":"Solaris 8","fromName":"Uwe Zeisberger","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-06-26T08:09:12Z","receivedAt":"2006-06-26T08:09:12Z","isPatch":false,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello,\n\nwhen trying to get git running on Solaris 8 (gcc 2.95), there are\nseveral pit-falls:\n\n1) for me, install and tar are GNUish, ginstall and gtar don't exist.\n   (INSTALL = ginstall, TAR = gtar for SunOS in Makefile)\n\n2) connect.c and merge-index.c use signal() without including signal.h\n\n3) Solaris ships zlib 1.1.3.  That version doesn't define\n   ZLIB_VERNUM.  But no, that's not my problem, ... I have it: There is\n   another zlib version in /usr/local.  That's 1.2.3, defining\n   ZLIB_VERNUM as 0x1230.  The compiler uses include files from\n   /usr/local, but lib from /usr/lib.  Aargh, I have to dig the admins\n   here...\n\n4) libc don't know printf z and t modifier:\n\n\talloc.c: In function `alloc_report':\n\talloc.c:47: warning: unknown conversion type character `z' in format\n\talloc.c:47: warning: too many arguments for format\n\talloc.c:48: warning: unknown conversion type character `z' in format\n\talloc.c:48: warning: too many arguments for format\n\talloc.c:49: warning: unknown conversion type character `z' in format\n\talloc.c:49: warning: too many arguments for format\n\talloc.c:50: warning: unknown conversion type character `z' in format\n\talloc.c:50: warning: too many arguments for format\n\tmktag.c: In function `verify_tag':\n\tmktag.c:69: warning: unknown conversion type character `t' in format\n\tmktag.c:69: warning: too many arguments for format\n\tmktag.c:72: warning: unknown conversion type character `t' in format\n\tmktag.c:72: warning: too many arguments for format\n\tmktag.c:77: warning: unknown conversion type character `t' in format\n\tmktag.c:77: warning: too many arguments for format\n\tmktag.c:97: warning: unknown conversion type character `t' in format\n\tmktag.c:97: warning: too many arguments for format\n\tmktag.c:104: warning: unknown conversion type character `t' in format\n\tmktag.c:104: warning: too many arguments for format\n\n5) I don't understand why I get this warning for EMIT(c), but not for\n   EMIT('\\\\'):\n\n\tquote.c:34: warning: value computed is not used\n\tquote.c:37: warning: value computed is not used\n\n6) typedef long pid_t\n\tupload-pack.c: In function `create_pack_file':\n\tupload-pack.c:277: warning: int format, pid_t arg (arg 2)\n\tdaemon.c: In function `remove_child':\n\tdaemon.c:371: warning: int format, pid_t arg (arg 2)\n\tdaemon.c: In function `child_handler':\n\tdaemon.c:481: warning: int format, pid_t arg (arg 3)\n\n7) I think these can safely be ignored:\n\tbuiltin-help.c: In function `cmd_help':\n\tbuiltin-help.c:234: warning: null format string\n\tbuiltin-help.c:236: warning: null format string\n\tgit.c: In function `main':\n\tgit.c:280: warning: null format string\n\nI'll send out patches in reply to this mail for 2) and 6)\n\n-- \nUwe Zeisberger\n\nmain(){char*a=\"main(){char*a=%c%s%c;printf(a,34,a,34%c\";printf(a,34,a,34\n,10);a=\",10);a=%c%s%c;printf(a,34,a,34,10);}%c\";printf(a,34,a,34,10);}\n"},{"id":"22591","messageId":"20060626082323.GB3646@informatik.uni-freiburg.de","threadId":"4670","inReplyTo":"20060626080912.GA3646@informatik.uni-freiburg.de","subject":"[PATCH] include signal.h for prototype of signal()","fromName":"Uwe Zeisberger","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-06-26T08:23:23Z","receivedAt":"2006-06-26T08:23:23Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>\n\n---\n\n connect.c     |    1 +\n merge-index.c |    1 +\n 2 files changed, 2 insertions(+), 0 deletions(-)\n\n46cd6d04f4531dfaf56f7f1beb4ea6c73f08015e\ndiff --git a/connect.c b/connect.c\nindex db7342e..6c5389b 100644\n--- a/connect.c\n+++ b/connect.c\n@@ -3,6 +3,7 @@\n #include \"pkt-line.h\"\n #include \"quote.h\"\n #include \"refs.h\"\n+#include <signal.h>\n #include <sys/wait.h>\n #include <sys/socket.h>\n #include <netinet/in.h>\ndiff --git a/merge-index.c b/merge-index.c\nindex 190e12f..91908d8 100644\n--- a/merge-index.c\n+++ b/merge-index.c\n@@ -1,3 +1,4 @@\n+#include <signal.h>\n #include <sys/types.h>\n #include <sys/wait.h>\n \n-- \n1.1.6.g7d80e\n\n\n-- \nUwe Zeisberger\n\nhttp://www.google.com/search?q=the+speed+of+light+in+m%2Fs\n"},{"id":"22593","messageId":"20060626082606.GC3646@informatik.uni-freiburg.de","threadId":"4670","inReplyTo":"20060626080912.GA3646@informatik.uni-freiburg.de","subject":"[PATCH] cast pid_t to long for printing","fromName":"Uwe Zeisberger","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-06-26T08:26:06Z","receivedAt":"2006-06-26T08:26:06Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"This fixes warnings on Solaris 8.\n\nSigned-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>\n\n---\n\nWhile fixing daemon.c, I saw that there is a call to syslog using %d for\npid_t, too.  I fixed that in the same way without further testing and\nmanual reading. I assume that's OK.\n\n daemon.c      |    9 ++++++---\n upload-pack.c |    2 +-\n 2 files changed, 7 insertions(+), 4 deletions(-)\n\nb339b05462efea5fee9f2b9bf70de03897a5e4ab\ndiff --git a/daemon.c b/daemon.c\nindex 1ba4d66..8641b13 100644\n--- a/daemon.c\n+++ b/daemon.c\n@@ -368,7 +368,7 @@ static void remove_child(pid_t pid, unsi\n \t\tstruct child m;\n \t\tdeleted = (deleted + 1) % MAX_CHILDREN;\n \t\tif (deleted == spawned)\n-\t\t\tdie(\"could not find dead child %d\\n\", pid);\n+\t\t\tdie(\"could not find dead child %ld\\n\", (long)pid);\n \t\tm = live_child[deleted];\n \t\tlive_child[deleted] = n;\n \t\tif (m.pid == pid)\n@@ -476,9 +476,12 @@ static void child_handler(int signo)\n \t\t\t\tif (!WIFEXITED(status) || WEXITSTATUS(status) > 0)\n \t\t\t\t\tdead = \" (with error)\";\n \t\t\t\tif (log_syslog)\n-\t\t\t\t\tsyslog(LOG_INFO, \"[%d] Disconnected%s\", pid, dead);\n+\t\t\t\t\tsyslog(LOG_INFO, \"[%ld] Disconnected%s\",\n+\t\t\t\t\t       (long)pid, dead);\n \t\t\t\telse\n-\t\t\t\t\tfprintf(stderr, \"[%d] Disconnected%s\\n\", pid, dead);\n+\t\t\t\t\tfprintf(stderr,\n+\t\t\t\t\t\t\"[%ld] Disconnected%s\\n\",\n+\t\t\t\t\t\t(long)pid, dead);\n \t\t\t}\n \t\t\tcontinue;\n \t\t}\ndiff --git a/upload-pack.c b/upload-pack.c\nindex 7b86f69..fdfef39 100644\n--- a/upload-pack.c\n+++ b/upload-pack.c\n@@ -274,7 +274,7 @@ static void create_pack_file(void)\n \t\t\t\t\tgoto fail;\n \t\t\t\t}\n \t\t\t\terror(\"git-upload-pack: we weren't \"\n-\t\t\t\t      \"waiting for %d\", pid);\n+\t\t\t\t      \"waiting for %ld\", (long)pid);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\tif (!WIFEXITED(status) || WEXITSTATUS(status) > 0) {\n-- \n1.1.6.g7d80e\n\n-- \nUwe Zeisberger\n\nexit vi, lesson V:\no : q ! CTRL-V <CR> <Esc> \" d d d @ d\n"},{"id":"22599","messageId":"20060626085119.GE3646@informatik.uni-freiburg.de","threadId":"4670","inReplyTo":"20060626082323.GB3646@informatik.uni-freiburg.de","subject":"Re: [PATCH] include signal.h for prototype of signal()","fromName":"Uwe Zeisberger","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-06-26T08:51:19Z","receivedAt":"2006-06-26T08:51:19Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Hello, \n\nOops, this patch was already posted by Dennis Stosberg in\n<20060626082613.G7dd5c243@leonov.stosberg.net>.  (But it lacks a\nsign-off, as do his other patches.)\n\nUwe Zeisberger wrote:\n> Signed-off-by: Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>\n> \n> ---\n> \n>  connect.c     |    1 +\n>  merge-index.c |    1 +\n>  2 files changed, 2 insertions(+), 0 deletions(-)\n> \n> 46cd6d04f4531dfaf56f7f1beb4ea6c73f08015e\n> diff --git a/connect.c b/connect.c\n> index db7342e..6c5389b 100644\n> --- a/connect.c\n> +++ b/connect.c\n> @@ -3,6 +3,7 @@\n>  #include \"pkt-line.h\"\n>  #include \"quote.h\"\n>  #include \"refs.h\"\n> +#include <signal.h>\n>  #include <sys/wait.h>\n>  #include <sys/socket.h>\n>  #include <netinet/in.h>\n> diff --git a/merge-index.c b/merge-index.c\n> index 190e12f..91908d8 100644\n> --- a/merge-index.c\n> +++ b/merge-index.c\n> @@ -1,3 +1,4 @@\n> +#include <signal.h>\n>  #include <sys/types.h>\n>  #include <sys/wait.h>\n>  \n\n-- \nUwe Zeisberger\n\ncat /*dev/null; echo 'Hello World!';\ncat > /dev/null <<*/ \n() { } int main() { printf(\"Hello World!\\n\");}\n/* */\n"},{"id":"22601","messageId":"7vr71ci7yt.fsf@assigned-by-dhcp.cox.net","threadId":"4670","inReplyTo":"20060626082606.GC3646@informatik.uni-freiburg.de","subject":"Re: [PATCH] cast pid_t to long for printing","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-26T09:26:02Z","receivedAt":"2006-06-26T09:26:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> writes:\n\n> While fixing daemon.c, I saw that there is a call to syslog using %d for\n> pid_t, too.  I fixed that in the same way without further testing and\n> manual reading. I assume that's OK.\n\nIs anybody using pid_t that is wider than int?  IOW, I wonder if\nit would make more sense to use \"%d\" with casting to int.\n"},{"id":"22606","messageId":"20060626121325.GA19314@informatik.uni-freiburg.de","threadId":"4670","inReplyTo":"7vr71ci7yt.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] cast pid_t to long for printing","fromName":"Uwe Zeisberger","fromEmail":"zeisberg@informatik.uni-freiburg.de","sentAt":"2006-06-26T12:13:25Z","receivedAt":"2006-06-26T12:13:25Z","isPatch":true,"sender":{"key":"u.kleine-koenig@pengutronix.de","avatar":"https://gravatar.com/avatar/354b5e3ceb2806a2f1e1e382ac29ddbdad18288654da62b61eb13583a857eee7?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> writes:\n> \n> > While fixing daemon.c, I saw that there is a call to syslog using %d for\n> > pid_t, too.  I fixed that in the same way without further testing and\n> > manual reading. I assume that's OK.\n> \n> Is anybody using pid_t that is wider than int?  IOW, I wonder if\n> it would make more sense to use \"%d\" with casting to int.\nSee types(3HEAD) e.g. on \n\n\thttp://docs.sun.com/app/docs/doc/816-5173/6mbb8ae36?a=view\n\nSo it's always as long as int, but it is defined as long...\n\nBest regards\nUwe\n\n-- \nUwe Zeisberger\n\nhttp://www.google.com/search?q=gravity+on+earth%3D\n"}]}