Ben Pfaff wrote:
> For what it's worth, is a smaller header that also
> defines NULL.
You're right. Better use .
2007-10-15 Bruno Haible <[EMAIL PROTECTED]>
* m4/getaddrinfo.m4 (gl_GETADDRINFO, gl_PREREQ_GETADDRINFO): Use
instead of since we only need NULL.
Reported
Bruno Haible <[EMAIL PROTECTED]> writes:
> Hmm. How about making sure that NULL is actually defined, before using it?
> Proposed patch:
[...]
> + #include
For what it's worth, is a smaller header that also
defines NULL.
--
"J'avais trouv'e ma religion :
rien ne me parut plus important qu'un l
Bruno Haible <[EMAIL PROTECTED]> writes:
> Simon,
>
>> > So, the above should be fixed as well.
>>
>> Fixed, thanks.
>
> Hmm. How about making sure that NULL is actually defined, before using it?
Thanks, please commit.
/Simon
Simon,
> > So, the above should be fixed as well.
>
> Fixed, thanks.
Hmm. How about making sure that NULL is actually defined, before using it?
Proposed patch:
*** m4/getaddrinfo.m4.orig 2007-10-15 12:33:54.0 +0200
--- m4/getaddrinfo.m4 2007-10-15 12:30:25.0 +0200
***
Albert Chin <[EMAIL PROTECTED]> writes:
> On Wed, Oct 13, 2007 at 16:25:21PM +0200, Bruno Haible wrote:
>> I'm applying your patch, with modifications:
>> ...
>> 4) Don't use 0 to designate null pointers. That doesn't sit well with
>> C++ compilers.
>
> I only used 0 because further down in
On Wed, Oct 13, 2007 at 16:25:21PM +0200, Bruno Haible wrote:
> I'm applying your patch, with modifications:
> ...
> 4) Don't use 0 to designate null pointers. That doesn't sit well with
> C++ compilers.
I only used 0 because further down in m4/getaddrinfo.m4 is:
AC_TRY_LINK([
#ifdef
Ben Pfaff wrote:
> ISO C says that NULL can be defined as 0, without a cast to void
> *, and it is always defined that way in C++.
The latter statement is not true. ISO C++ 18.1.(3) says:
"The macro NULL is an implementation-defined C++ null pointer constant
in this International Standard (4
Benoit SIGOURE wrote:
> In C++, `0' is the preferred way of expressing `NULL'.
In C++, 0 can be used instead of NULL everywhere except inside sizeof and
varargs argument lists.
But what is _preferred_, depends on your and your co-developers' habits.
People who also program in C prefer NULL becau
Bruno Haible <[EMAIL PROTECTED]> wrote:
> Benoit SIGOURE wrote:
>> > 4) Don't use 0 to designate null pointers. That doesn't sit well with
>> > C++ compilers.
>>
>> s/C++/C/ right?
>
> Actually, neither C nor C++ compilers cry when you use 0 for NULL. It's only
> my personal preference.
I p
Simon Josefsson <[EMAIL PROTECTED]> writes:
> On platforms where integers aren't the same size as pointers, things can
> go wrong if 1) you pass 0 to a function that expects a pointer and no
> function prototype was available during compilation, or 2) you pass it
> to a function that takes a varia
On Oct 13, 2007, at 9:34 PM, Simon Josefsson wrote:
Bruno Haible <[EMAIL PROTECTED]> writes:
Benoit SIGOURE wrote:
4) Don't use 0 to designate null pointers. That doesn't sit
well with
C++ compilers.
s/C++/C/ right?
Actually, neither C nor C++ compilers cry when you use 0 for NUL
Bruno Haible <[EMAIL PROTECTED]> writes:
> Benoit SIGOURE wrote:
>> > 4) Don't use 0 to designate null pointers. That doesn't sit well with
>> > C++ compilers.
>>
>> s/C++/C/ right?
>
> Actually, neither C nor C++ compilers cry when you use 0 for NULL. It's only
> my personal preference.
Benoit SIGOURE wrote:
> > 4) Don't use 0 to designate null pointers. That doesn't sit well with
> > C++ compilers.
>
> s/C++/C/ right?
Actually, neither C nor C++ compilers cry when you use 0 for NULL. It's only
my personal preference.
Bruno
Bruno Haible <[EMAIL PROTECTED]> writes:
> Hi Albert,
>
> Simon has not taken this up in 3 days, so I'm doing it.
Thanks! Your patch looks fine to me.
/Simon
On Oct 13, 2007, at 4:25 PM, Bruno Haible wrote:
4) Don't use 0 to designate null pointers. That doesn't sit well
with
C++ compilers.
s/C++/C/ right?
--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory
PGP.sig
Description: This is a digitally signed message part
Hi Albert,
Simon has not taken this up in 3 days, so I'm doing it.
Albert Chin wrote:
> m4/getaddrinfo.m4 tests for getaddrinfo with:
> AC_CHECK_FUNCS(getaddrinfo
>
> This assumes getaddrinfo is available on the system under the name
> `getaddrinfo'. Not so on Tru64 UNIX 5.1 where has:
> #i
m4/getaddrinfo.m4 tests for getaddrinfo with:
AC_CHECK_FUNCS(getaddrinfo
This assumes getaddrinfo is available on the system under the name
`getaddrinfo'. Not so on Tru64 UNIX 5.1 where has:
#if defined (_SOCKADDR_LEN) || defined (_XOPEN_SOURCE_EXTENDED)
#define getaddrinfo ngetaddrinfo
#
17 matches
Mail list logo