bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] New test client for Inetd.


From: Mats Erik Andersson
Subject: Re: [bug-inetutils] New test client for Inetd.
Date: Tue, 23 Nov 2010 00:41:47 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Dear all,

tisdag den  9 november 2010 klockan 18:26 skrev Alfred M. Szmidt detta:
>    diff --git a/tests/addrpeek.c b/tests/addrpeek.c
>    new file mode 100644
>    index 0000000..d68545a
>    --- /dev/null
>    +++ b/tests/addrpeek.c
>    @@ -0,0 +1,112 @@
>    +/*
> 
> We have been bad at this, but a single line at the top to describe the
> intent of the file would be grand
> 
>    +int
>    +main (int argc, char *argv[], char *envp[])
>                                   ^^^^^^^^^^^^
> 
> Not portable, C only guarantees either void or "int, char **" (or
> similar) as prototype.

I ask for permission to push a revised edition of "tests/addrpeek.c".
Both points above have been addressed, and Simon's suggestion to
include "config.h" works well. The code now builds and executes
correctly for GNU/Linux, GNU/kFreeBSD, OpenBSD, and FreeBSD.

There is one issue with HAVE_DECL_ENVIRON, since it is set only
for GNU/Linux and GNU/kFreeBSD, neither for OpenBSD nor FreeBSD.
Yet all four have a functional

   extern char **environ;

This is due to the declaration in <unistd.h> for glibc, but which
is lacking for *BSD. I did spend substantial time to develop something
similar to

   #if HAVE_DECL_ENVIRON || GNULIB_ENVIRON
   extern char **environ;
   #endif

but I never was able to detect GNULIB_ENVIRON in the C code itself.
Therefore I removed all tests in the end. They will have to be inserted
later on again.

It it my hope that this will not prevent me from getting a permission
to push this contribution.


Best regards,

Mats  

Attachment: 0002-addrpeek-New-test-service-for-Inetd.patch
Description: Text Data

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]