* [RFD] socklen_t needs to be defined and libssl to be linked on old Mac OS X
@ 2005-07-28 14:51 Johannes Schindelin
2005-07-29 2:24 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Schindelin @ 2005-07-28 14:51 UTC (permalink / raw)
To: git
On older Mac OS X (10.2.8), no socklen_t is defined, and therefore
daemon.c does not compile. However, Mac OS X 10.4 seems to define
socklen_t differently.
Also, linking fails due to some symbols defined in libssl (not just
libcrypto).
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
Makefile | 4 ++++
daemon.c | 3 +++
2 files changed, 7 insertions
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -95,7 +95,11 @@ ifdef PPC_SHA1
LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
else
SHA1_HEADER=<openssl/sha.h>
+ifeq ($(shell uname -s),Darwin)
+ LIBS += -lcrypto -lssl
+else
LIBS += -lcrypto
+endif
endif
endif
diff --git a/daemon.c b/daemon.c
--- a/daemon.c
+++ b/daemon.c
@@ -5,6 +5,9 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
+#ifdef __APPLE__
+typedef int socklen_t;
+#endif
static const char daemon_usage[] = "git-daemon [--inetd | --port=n]";
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFD] socklen_t needs to be defined and libssl to be linked on old Mac OS X
2005-07-28 14:51 [RFD] socklen_t needs to be defined and libssl to be linked on old Mac OS X Johannes Schindelin
@ 2005-07-29 2:24 ` Junio C Hamano
2005-07-29 10:27 ` Johannes Schindelin
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2005-07-29 2:24 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> On older Mac OS X (10.2.8), no socklen_t is defined, and therefore
> daemon.c does not compile. However, Mac OS X 10.4 seems to define
> socklen_t differently.
>
> Also, linking fails due to some symbols defined in libssl (not just
> libcrypto).
Hmph. While I would want things to be portable, I prefer to
avoid platform specific #ifdef and conditional Makefile
constructs.
> SHA1_HEADER=<openssl/sha.h>
> +ifeq ($(shell uname -s),Darwin)
> + LIBS += -lcrypto -lssl
> +else
> LIBS += -lcrypto
> +endif
> endif
> #include <arpa/inet.h>
> +#ifdef __APPLE__
> +typedef int socklen_t;
> +#endif
I'll keep this in the proposed updates queue until somebody
comes up with a bit cleaner solution.
By the way, Johannes, what mailer do you use? Many of your
patches seem to be whitespace damaged. For example:
> diff --git a/daemon.c b/daemon.c
> --- a/daemon.c
> +++ b/daemon.c
> @@ -5,6 +5,9 @@
> #include <sys/socket.h>
> #include <netinet/in.h>
> #include <arpa/inet.h>
> +#ifdef __APPLE__
> +typedef int socklen_t;
> +#endif
>
> static const char daemon_usage[] = "git-daemon [--inetd | --port=n]";
The empty line before daemon_usage[] line should start with a
single SP but your message does not seem to have it. I double
checked with the copy marc has:
http://marc.theaimsgroup.com/?l=git&m=112256286508546&q=raw
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [RFD] socklen_t needs to be defined and libssl to be linked on old Mac OS X
2005-07-29 2:24 ` Junio C Hamano
@ 2005-07-29 10:27 ` Johannes Schindelin
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Schindelin @ 2005-07-29 10:27 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Hi,
On Thu, 28 Jul 2005, Junio C Hamano wrote:
> I'll keep this in the proposed updates queue until somebody
> comes up with a bit cleaner solution.
Agreed. That's why I put in "RFD", not "PATCH"
> By the way, Johannes, what mailer do you use? Many of your
> patches seem to be whitespace damaged.
Why, I use pine! The whitespace could be the consequence of a very tired
yours truly doing copy and paste. Anyway, this was not really meant as a
patch, but rather as documentation of my thoughts.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-29 10:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-28 14:51 [RFD] socklen_t needs to be defined and libssl to be linked on old Mac OS X Johannes Schindelin
2005-07-29 2:24 ` Junio C Hamano
2005-07-29 10:27 ` Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox