coreutils
[Top][All Lists]
Advanced

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

Re: [coreutils] [PATCH] maint: trivial system header file cleanups


From: Jim Meyering
Subject: Re: [coreutils] [PATCH] maint: trivial system header file cleanups
Date: Fri, 14 Jan 2011 08:22:24 +0100

Pádraig Brady wrote:
>>From e1aaf8903db97f3240b1551fd6936ccdc652dfc8 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?P=C3=A1draig=20Brady?= <address@hidden>
> Date: Thu, 13 Jan 2011 09:36:38 +0000
> Subject: [PATCH] maint: trivial system header file cleanups
>
> * src/system.h: Note where it should be included, and
> make ordering check portable to GLIBC > 2
> * src/copy.c: Move <sys/ioctl.h> along with other system headers
> as is done elsewhere.
> * src/install.c: Move <sys/wait.h> along with other system headers
> as is done elsewhere.
> * src/ptx.c: Include <regex.h> rather than "regex.h" as
> is done elsewhere.  Note <regex.h> is kept after "system.h"
> as per commit dba300a0.

Those look fine.  Thanks.

...
> diff --git a/src/system.h b/src/system.h
> index 3b32cbd..b86e570 100644
> --- a/src/system.h
> +++ b/src/system.h
> @@ -14,11 +14,15 @@
>     You should have received a copy of the GNU General Public License
>     along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
>
> +/* Include this file _after_ system headers if possible.  */
> +
>  #include <alloca.h>
>
> -/* Include sys/types.h before this file.  */
> +/* Include <sys/types.h> before this file.
> +   Note this doesn't warn if we're included
> +   before all system headers.  */
>
> -#if 2 <= __GLIBC__ && 2 <= __GLIBC_MINOR__
> +#if 2 < __GLIBC__ || ( 2 == ___GLIBC__ && 2 <= __GLIBC_MINOR__ )

Good one.



reply via email to

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