git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Johannes Sixt <j.sixt@viscovery.net>
Subject: Re: [PATCH 003/160] gettext: fix bug in git-sh-i18n's eval_gettext() by using envsubst(1)
Date: Sun, 14 Nov 2010 15:47:32 -0600	[thread overview]
Message-ID: <20101114214731.GA16413@burratino> (raw)
In-Reply-To: <AANLkTim-j6TLwz0PugZvaEf1x3hW=76vT1gALC=w3DOu@mail.gmail.com>

Ævar Arnfjörð Bjarmason wrote:

> This is how it currently gets compiled:
> 
>     $ rm git-sh-i18n--envsubst sh-i18n--envsubst.o; make -j 5 all V=1
>     gcc -o sh-i18n--envsubst.o -c   -g -O2 -Wall -I.  -DHAVE_PATHS_H
> -DSHA1_HEADER='<openssl/sha.h>'  -DNO_STRLCPY -DNO_MKSTEMPS
> sh-i18n--envsubst.c
>     gcc  -g -O2 -Wall -I.  -DHAVE_PATHS_H
> -DSHA1_HEADER='<openssl/sha.h>'  -DNO_STRLCPY -DNO_MKSTEMPS -o
> git-sh-i18n--envsubst   sh-i18n--envsubst.o libgit.a xdiff/lib.a  -lz
> -lcrypto -lpthread
> 
> I tried to remove some of those library includes. But it'll
> complain. However if I do:
> 
>     diff --git a/sh-i18n--envsubst.c b/sh-i18n--envsubst.c
>     index 8db71b1..7d4c870 100644
>     --- a/sh-i18n--envsubst.c
>     +++ b/sh-i18n--envsubst.c
>     @@ -215 +215 @@ string_list_append (string_list_ty *slp, const char *s)
>     -      slp->item = (const char **) xrealloc (slp->item, nbytes);
>     +      slp->item = (const char **) realloc (slp->item, nbytes);
[...]
> It'll compile stand-alone with no library includes at all.

Yes, that is what $gmane/160842 is about (also see $gmane/137738 for
background).  In this case, a simple local stub xmalloc/xrealloc etc
to take care of checking for NULL seems fine, indeed.

  reply	other threads:[~2010-11-14 21:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-14 15:07 [PATCH 000/160] [PULL] ab/i18n rebased on ab/i18n-prereqs Ævar Arnfjörð Bjarmason
2010-11-14 15:07 ` [PATCH 002/160] Makefile: Set NO_GETTEXT=YesPlease on Windows & MinGW Ævar Arnfjörð Bjarmason
2010-11-15 10:35   ` Erik Faye-Lund
2010-11-14 15:07 ` [PATCH 003/160] gettext: fix bug in git-sh-i18n's eval_gettext() by using envsubst(1) Ævar Arnfjörð Bjarmason
2010-11-14 18:16   ` Jonathan Nieder
2010-11-14 19:15     ` Junio C Hamano
2010-11-14 21:25       ` Ævar Arnfjörð Bjarmason
2010-11-14 21:27         ` Jonathan Nieder
2010-11-14 21:42           ` Ævar Arnfjörð Bjarmason
2010-11-14 21:47             ` Jonathan Nieder [this message]
2010-11-14 22:26               ` Ævar Arnfjörð Bjarmason
2010-11-16  0:53 ` [PATCH 000/160] [PULL] ab/i18n rebased on ab/i18n-prereqs Ævar Arnfjörð Bjarmason

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=20101114214731.GA16413@burratino \
    --to=jrnieder@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j.sixt@viscovery.net \
    /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).