git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Riedy <ejr@EECS.Berkeley.EDU>
To: Patrick Mauritz <oxygene@studentenbude.ath.cx>
Cc: git@vger.kernel.org
Subject: Re: patches
Date: Fri, 09 Sep 2005 15:25:22 -0700	[thread overview]
Message-ID: <25968.1126304722@lotus.CS.Berkeley.EDU> (raw)
In-Reply-To: <1125962642.15293.20.camel@divert>

And Patrick Mauritz writes:
 - 
 - --- git-core-0.99.5.orig/convert-cache.c	Wed Aug 17 09:55:00 2005
 - +++ git-core-0.99.5/convert-cache.c	Wed Aug 17 09:58:48 2005
 - @@ -1,4 +1,5 @@
 -  #define _XOPEN_SOURCE /* glibc2 needs this */
 - +#define __EXTENSIONS__ /* solaris needs this */

To be honest, the right place to handle both these 
#defines is the Makefile.  AIX needs its own set of 
-Ds to turn on various standards.  ugh.  I'm sure 
HP-UX needs even more magic, IRIX needs (is?) a dead 
chicken, etc.

 - +#ifndef __sun
[...]
 -  		getdomainname(real_email+len, sizeof(real_email)-len);
[...]
 - +#endif

getdomainname isn't declared, but it is in libnsl
(on Solaris 8, Sparc) and works just fine.  Sun 
documents sysinfo (2) as its replacement, but that 
call is different on different platforms.  I'd be
shocked if getdomainname disappeared from libnsl,
especially since the C++ include files declare it.
Whoops.

 - +ifeq ($(shell uname -s),SunOS)
 - +  LIBS += -lsocket
 - +endif

Traditionally, it's -lsocket -lnsl to cover all the
bases.  Old SunOS4 -> SunOS5 porting annoyance.  That 
also lets getdomainname work.

The Makefile is generally insufficient for any platform
other than Linux with system-supplied support libraries.
Fixing that will take a good deal of work and probably
will involve putting a bunch of variable-defining makefile
fragments somewhere and including the "right" one.  With
the right variable definitions, a user can over-ride any
of them from the make command...

In the meantime, my personal coping method is just to copy
the Makefile to Makefile.platform, edit it, and use make -f 
Makefile.platform.  I could be really cool and just use a 
different git branch per platform, but I'm lazy.

Jason

  parent reply	other threads:[~2005-09-09 22:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-05 23:24 patches Patrick Mauritz
2005-09-08  2:06 ` patches Junio C Hamano
2005-09-08 10:11   ` patches Patrick Mauritz
2005-09-09 22:25 ` Jason Riedy [this message]
2005-09-12  5:39   ` [PATCH] getdomainname should be usable on SunOS with -lnsl Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2007-11-26  2:27 patches J. Bruce Fields

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=25968.1126304722@lotus.CS.Berkeley.EDU \
    --to=ejr@eecs.berkeley.edu \
    --cc=git@vger.kernel.org \
    --cc=oxygene@studentenbude.ath.cx \
    /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;
as well as URLs for NNTP newsgroup(s).