From bd249f0177d2e214f04724330733840884bd27cf Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 16 Nov 2012 17:35:14 +0000 Subject: [PATCH] * include/mntent.h: Only include paths.h when building for Cygwin. Add comment to explain why. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/include/mntent.h | 12 +++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 8594dd1b1..18b110dda 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2012-11-16 Corinna Vinschen + + * include/mntent.h: Only include paths.h when building for Cygwin. + Add comment to explain why. + 2012-11-11 Corinna Vinschen * winbase.h: Semi-reinstantiate to workaround lack inline assembler diff --git a/winsup/cygwin/include/mntent.h b/winsup/cygwin/include/mntent.h index 5fb8e3a70..db87904ef 100644 --- a/winsup/cygwin/include/mntent.h +++ b/winsup/cygwin/include/mntent.h @@ -1,6 +1,6 @@ /* mntent.h - Copyright 1996, 1998, 1999, 2000, 2001, 2006, 2009, 2010 Red Hat, Inc. + Copyright 1996, 1998, 1999, 2000, 2001, 2006, 2009, 2010, 2012 Red Hat, Inc. This file is part of Cygwin. @@ -15,8 +15,6 @@ details. */ extern "C" { #endif -#include - struct mntent { char *mnt_fsname; @@ -35,6 +33,12 @@ struct mntent *getmntent_r (FILE *, struct mntent *, char *, int); int endmntent (FILE *__filep); #endif +#ifdef __CYGWIN__ +/* Only include paths.h if building for Cygwin. This avoids including + newlib headers when building the native tools in winsup/utils. */ + +#include + /* The following two defines are deprecated. Use the equivalent names from paths.h instead. */ #ifndef MNTTAB @@ -48,6 +52,8 @@ int endmntent (FILE *__filep); #define MOUNTED _PATH_MOUNTED #endif +#endif /* __CYGWIN__ */ + #ifdef __cplusplus }; #endif