Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Mar 2002 20:06:17 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        markm@FreeBSD.ORG
Cc:        audit@FreeBSD.ORG
Subject:   Re: __progname cleanups - commit candidate 2
Message-ID:  <20020330195324.F745-100000@gamplex.bde.org>
In-Reply-To: <200203282029.g2SKTDdC005176@greenpeace.grondar.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 28 Mar 2002 markm@FreeBSD.ORG wrote:

> Index: libc/gen/err.c
> ===================================================================
> RCS file: /home/ncvs/src/lib/libc/gen/err.c,v
> retrieving revision 1.12
> diff -u -d -r1.12 err.c
> --- libc/gen/err.c	22 Mar 2002 21:52:05 -0000	1.12
> +++ libc/gen/err.c	27 Mar 2002 11:08:23 -0000
> @@ -39,15 +39,14 @@
>
>  #include "namespace.h"
>  #include <err.h>
> -#include "un-namespace.h"
>  #include <errno.h>
> +#include <stdarg.h>
>  #include <stdio.h>
>  #include <stdlib.h>
>  #include <string.h>
> +#include "un-namespace.h"

Note another advantage of bracketing all other includes with the
namespace includes: it hides all the prototypes for standard interfaces
that are redefined in namespace.h, so we get errors if we reference
the standard interfaces, provided we compile the library with WARNS,
which we don't.  Declaring additional prototypes for the nonstandard
entry points doesn't work so well since it doesn't generate these errors.

> Index: libc/include/namespace.h
> ===================================================================
> RCS file: /home/ncvs/src/lib/libc/include/namespace.h,v
> retrieving revision 1.8
> diff -u -d -r1.8 namespace.h
> --- libc/include/namespace.h	22 Mar 2002 23:41:48 -0000	1.8
> +++ libc/include/namespace.h	27 Mar 2002 11:14:23 -0000
> @@ -67,6 +67,7 @@
>  #define		getdirentries			_getdirentries
>  #define		getlogin			_getlogin
>  #define		getpeername			_getpeername
> +#define		getprogname			_getprogname
>  #define		getsockname			_getsockname
>  #define		getsockopt			_getsockopt
>  #define		ioctl				_ioctl
> Index: libc/include/un-namespace.h
> ===================================================================
> RCS file: /home/ncvs/src/lib/libc/include/un-namespace.h,v
> retrieving revision 1.6
> diff -u -d -r1.6 un-namespace.h
> --- libc/include/un-namespace.h	11 Nov 2001 02:48:09 -0000	1.6
> +++ libc/include/un-namespace.h	27 Mar 2002 11:14:29 -0000
> @@ -52,6 +52,7 @@
>  #undef		getdirentries
>  #undef		getlogin
>  #undef		getpeername
> +#undef		getprogname
>  #undef		getsockname
>  #undef		getsockopt
>  #undef		ioctl

Misplaced #define and #undef.  They are in the libc_r/libpthread section
but have nothing to do with libc_r/libpthread.

Everything else except the line lengths seems to be OK.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020330195324.F745-100000>