{"thread":{"id":"556","subject":"[PATCH] minor Makefile and local-pull.c edits for Darwin","startedAt":"2005-05-10T02:11:05Z","lastAt":"2005-05-10T21:12:00Z","messageCount":9,"participants":["Mark Allen","Daniel Barkalow","H. Peter Anvin","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"2941","messageId":"20050510021105.53984.qmail@web41213.mail.yahoo.com","threadId":"556","inReplyTo":null,"subject":"[PATCH] minor Makefile and local-pull.c edits for Darwin","fromName":"Mark Allen","fromEmail":"mrallen1@yahoo.com","sentAt":"2005-05-10T02:11:05Z","receivedAt":"2005-05-10T02:11:05Z","isPatch":true,"sender":{"key":"mrallen1@yahoo.com","avatar":null},"body":"Darwin puts all of the openssl functionality into libcrypto not libssl. Also, gcc\ncomplains about the st.size return value in local-pull.c if it's not cast explicitly as a\nlong.\n\nSigned-off-by: Mark Allen <mrallen1@yahoo.com>\n\nIndex: Makefile\n===================================================================\n--- 972d8624458936868e6f392b40858b7c362af8cd/Makefile  (mode:100644)\n+++ uncommitted/Makefile  (mode:100644)\n@@ -80,7 +80,11 @@\n        LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o\n else\n        SHA1_HEADER=<openssl/sha.h>\n-       LIBS += -lssl\n+       ifdef DARWIN\n+               LIBS += -lcrypto\n+       else\n+               LIBS += -lssl\n+       endif\n endif\n endif\n \nIndex: local-pull.c\n===================================================================\n--- 972d8624458936868e6f392b40858b7c362af8cd/local-pull.c  (mode:100644)\n+++ uncommitted/local-pull.c  (mode:100644)\n@@ -71,7 +71,7 @@\n                close(ofd);\n                if (status)\n                        fprintf(stderr, \"cannot write %s (%ld bytes)\\n\",\n-                               dest_filename, st.st_size);\n+                               dest_filename, (long) st.st_size);\n                else\n                        pull_say(\"copy %s\\n\", hex);\n                return status;\n"},{"id":"2948","messageId":"Pine.LNX.4.21.0505100019350.30848-100000@iabervon.org","threadId":"556","inReplyTo":"20050510021105.53984.qmail@web41213.mail.yahoo.com","subject":"Re: [PATCH] minor Makefile and local-pull.c edits for Darwin","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2005-05-10T04:23:34Z","receivedAt":"2005-05-10T04:23:34Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Mon, 9 May 2005, Mark Allen wrote:\n\n> Darwin puts all of the openssl functionality into libcrypto not\n> libssl.\n\nActually, the relevant openssl functionality is always in libcrypto, not\nlibssl. It's just that ELF shared libraries include dependancies, and\nlibssl pulls in libcrypto. If you change it, change it for everyone,\nrather than just Darwin.\n\n\t-Daniel\n*This .sig left intentionally blank*\n\n"},{"id":"2949","messageId":"428038D0.5000706@zytor.com","threadId":"556","inReplyTo":"20050510021105.53984.qmail@web41213.mail.yahoo.com","subject":"Re: [PATCH] minor Makefile and local-pull.c edits for Darwin","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-05-10T04:30:08Z","receivedAt":"2005-05-10T04:30:08Z","isPatch":true,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Mark Allen wrote:\n\n>  \n> Index: local-pull.c\n> ===================================================================\n> --- 972d8624458936868e6f392b40858b7c362af8cd/local-pull.c  (mode:100644)\n> +++ uncommitted/local-pull.c  (mode:100644)\n> @@ -71,7 +71,7 @@\n>                 close(ofd);\n>                 if (status)\n>                         fprintf(stderr, \"cannot write %s (%ld bytes)\\n\",\n> -                               dest_filename, st.st_size);\n> +                               dest_filename, (long) st.st_size);\n>                 else\n>                         pull_say(\"copy %s\\n\", hex);\n>                 return status;\n\nThis is just plain WRONG.  st.st_size is longer than long on many \narchitectures, including Linux/i386.\n\nThe easiest way to deal with it is to #include <inttypes.h>, use %jd and \ncast it to (intmax_t).  That is, however, a C99-ism.\n\n\t-hpa\n"},{"id":"2958","messageId":"7v1x8fr3gq.fsf@assigned-by-dhcp.cox.net","threadId":"556","inReplyTo":"Pine.LNX.4.21.0505100019350.30848-100000@iabervon.org","subject":"Re: [PATCH] minor Makefile and local-pull.c edits for Darwin","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-05-10T06:37:41Z","receivedAt":"2005-05-10T06:37:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">>>>> \"DB\" == Daniel Barkalow <barkalow@iabervon.org> writes:\n\nDB> Actually, the relevant openssl functionality is always in libcrypto, not\nDB> libssl...\n\nOk, could people try the following single liner, and if it\nbreaks yell loudly at me (or Daniel ;-)?  It worked for me but I\njust want to make sure before I put it in git-jc repository\nwhich I will ask Linus to pull from later.\n\n$ jit-diff 0:7\n# - HEAD: Introduce GIT_DIR environment variable.\n# + 7: Link with -lcrypto not -lssl\n--- a/Makefile\n+++ b/Makefile\n@@ -60,7 +60,7 @@ ifdef PPC_SHA1\n   LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o\n else\n   SHA1_HEADER=<openssl/sha.h>\n-  LIBS += -lssl\n+  LIBS += -lcrypto\n endif\n endif\n \n\n"},{"id":"2959","messageId":"7vpsvzpolp.fsf@assigned-by-dhcp.cox.net","threadId":"556","inReplyTo":"428038D0.5000706@zytor.com","subject":"Re: [PATCH] minor Makefile and local-pull.c edits for Darwin","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-05-10T06:44:02Z","receivedAt":"2005-05-10T06:44:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">>>>> \"HPA\" == H Peter Anvin <hpa@zytor.com> writes:\n\nHPA> This is just plain WRONG.  st.st_size is longer than long on many\nHPA> architectures, including Linux/i386.\n\nHPA> The easiest way to deal with it is to #include <inttypes.h>, use %jd\nHPA> and cast it to (intmax_t).  That is, however, a C99-ism.\n\nActually the easiest way is to stop reporting the size.  Nobody\nelse in core GIT reports st.st_size in their error messages.\n\nAlthough I agree with you that what you say about the size of\nst.st_size is correct, in GIT world view, apparently \"unsigned\nlong\" is big enough to hold st.st_size all over the code.  Would\nyou recommend tackling that assumption as well?\n\n"},{"id":"2974","messageId":"4280C883.6080209@zytor.com","threadId":"556","inReplyTo":"7vpsvzpolp.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] minor Makefile and local-pull.c edits for Darwin","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-05-10T14:43:15Z","receivedAt":"2005-05-10T14:43:15Z","isPatch":true,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Junio C Hamano wrote:\n> \n> HPA> This is just plain WRONG.  st.st_size is longer than long on many\n> HPA> architectures, including Linux/i386.\n> \n> HPA> The easiest way to deal with it is to #include <inttypes.h>, use %jd\n> HPA> and cast it to (intmax_t).  That is, however, a C99-ism.\n> \n> Actually the easiest way is to stop reporting the size.  Nobody\n> else in core GIT reports st.st_size in their error messages.\n> \n> Although I agree with you that what you say about the size of\n> st.st_size is correct, in GIT world view, apparently \"unsigned\n> long\" is big enough to hold st.st_size all over the code.  Would\n> you recommend tackling that assumption as well?\n\nProbably.  It's an off_t.\n\n\t-hpa\n"},{"id":"2975","messageId":"4280CAC6.4000805@zytor.com","threadId":"556","inReplyTo":"4280C883.6080209@zytor.com","subject":"Re: [PATCH] minor Makefile and local-pull.c edits for Darwin","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-05-10T14:52:54Z","receivedAt":"2005-05-10T14:52:54Z","isPatch":true,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"H. Peter Anvin wrote:\n> Junio C Hamano wrote:\n> \n>>\n>> HPA> This is just plain WRONG.  st.st_size is longer than long on many\n>> HPA> architectures, including Linux/i386.\n>>\n>> HPA> The easiest way to deal with it is to #include <inttypes.h>, use %jd\n>> HPA> and cast it to (intmax_t).  That is, however, a C99-ism.\n>>\n>> Actually the easiest way is to stop reporting the size.  Nobody\n>> else in core GIT reports st.st_size in their error messages.\n>>\n>> Although I agree with you that what you say about the size of\n>> st.st_size is correct, in GIT world view, apparently \"unsigned\n>> long\" is big enough to hold st.st_size all over the code.  Would\n>> you recommend tackling that assumption as well?\n> \n> Probably.  It's an off_t.\n> \n\nThat being said, there are also a whole bunch of assumptions that any \nobject can be memory-mapped *plus* fit uncompressed in memory... that's \nobviously not going to be the case for large files.\n\nOn the other hand, one has to start cleaning up somewhere...\n\n\t-hpa\n"},{"id":"2990","messageId":"7vekceyeo9.fsf@assigned-by-dhcp.cox.net","threadId":"556","inReplyTo":"4280CAC6.4000805@zytor.com","subject":"Re: [PATCH] minor Makefile and local-pull.c edits for Darwin","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-05-10T21:05:58Z","receivedAt":"2005-05-10T21:05:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">>>>> \"HPA\" == H Peter Anvin <hpa@zytor.com> writes:\n\nHPA> That being said, there are also a whole bunch of assumptions that any\nHPA> object can be memory-mapped *plus* fit uncompressed in\nHPA> memory... that's obviously not going to be the case for large files.\n\nHPA> On the other hand, one has to start cleaning up somewhere...\n\nI agree to that, but on the other hand one also has to know\nwhere to stop.  The primary purpose of GIT being to manage the\nsource files for the Linux kernel project, not worrying about\n_huge_ files that would cause mmap+uncompressed or st.st_size\nnot fitting in unsigned long may just be fine.\n\n\n\n"},{"id":"2991","messageId":"428123A0.3070000@zytor.com","threadId":"556","inReplyTo":"7vekceyeo9.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] minor Makefile and local-pull.c edits for Darwin","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-05-10T21:12:00Z","receivedAt":"2005-05-10T21:12:00Z","isPatch":true,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Junio C Hamano wrote:\n>>>>>>\"HPA\" == H Peter Anvin <hpa@zytor.com> writes:\n> \n> \n> HPA> That being said, there are also a whole bunch of assumptions that any\n> HPA> object can be memory-mapped *plus* fit uncompressed in\n> HPA> memory... that's obviously not going to be the case for large files.\n> \n> HPA> On the other hand, one has to start cleaning up somewhere...\n> \n> I agree to that, but on the other hand one also has to know\n> where to stop.  The primary purpose of GIT being to manage the\n> source files for the Linux kernel project, not worrying about\n> _huge_ files that would cause mmap+uncompressed or st.st_size\n> not fitting in unsigned long may just be fine.\n> \n\nUsing the correct data types is a good start, though.\n\n\t-hpa\n\n"}]}