Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [RFD] socklen_t needs to be defined and libssl to be linked on old Mac OS X
Date: Thu, 28 Jul 2005 19:24:17 -0700	[thread overview]
Message-ID: <7vfytyqrhq.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: Pine.LNX.4.58.0507281649230.25783@wgmdd8.biozentrum.uni-wuerzburg.de

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

  reply	other threads:[~2005-07-29  2:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2005-07-29 10:27   ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vfytyqrhq.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox