Git development
 help / color / mirror / Atom feed
From: "YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>
To: pasky@suse.cz
Cc: git@vger.kernel.org, yoshfuji@linux-ipv6.org
Subject: Re: [PATCH 1/2] GIT: Try all addresses for given remote name
Date: Fri, 22 Jul 2005 17:26:29 -0400 (EDT)	[thread overview]
Message-ID: <20050722.172629.73295196.yoshfuji@linux-ipv6.org> (raw)
In-Reply-To: <20050722210913.GH11916@pasky.ji.cz>

In article <20050722210913.GH11916@pasky.ji.cz> (at Fri, 22 Jul 2005 23:09:13 +0200), Petr Baudis <pasky@suse.cz> says:

> > -}
> > +#define STR_(s)	# s
> > +#define STR(s)	STR_(s)
> 
> Uh-huh? Why two macros? Well, why any macros at all?
> 
:
> > +	char *colon, *end;
> > +	char *port = STR(DEFAULT_GIT_PORT);
> > +	struct addrinfo hints, *ai0, *ai;

The macro is used here.
This is trick.

After preprocess,

/* --- cut here --- */
#define TEST 12345
#define STR_(s) # s
#define STR(s) STR_(s)

test(STR(TEST));
test(STR_(TEST));
test(# TEST);
/* --- cut here --- */

becomes

test("12345");
test("TEST");
test(# 12345);


> >  	if (sockfd < 0)
> >  		die("unable to create socket (%s)", strerror(errno));
> > -	if (connect(sockfd, (void *)&addr, sizeof(addr)) < 0)
> > -		die("unable to connect (%s)", strerror(errno));
:
> You are saying that you were unable to create socket while you just were
> unable to connect.  Not any biggie, but it saves the user the trouble of
> one strace after being confused by an error message. :-)

In fact, I don't think it is really worng, because it says that
it could not create (connected) socket or endpoint of connection.

Anyway, I agree that it would be confusing.
Better ideas / wordings?

--yoshfuji

  reply	other threads:[~2005-07-22 21:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-21 13:10 [PATCH 1/2] GIT: Try all addresses for given remote name YOSHIFUJI Hideaki / 吉藤英明
2005-07-22 21:09 ` Petr Baudis
2005-07-22 21:26   ` YOSHIFUJI Hideaki / 吉藤英明 [this message]
2005-07-22 21:37     ` Petr Baudis
2005-07-23  0:15     ` Sam Ravnborg

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=20050722.172629.73295196.yoshfuji@linux-ipv6.org \
    --to=yoshfuji@linux-ipv6.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    /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