summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-02-02 11:17:54 +0000
committerCorinna Vinschen <corinna@vinschen.de>2010-02-02 11:17:54 +0000
commitfac3c73ba0b0e0362dfa4648e1cd504ece77ece4 (patch)
tree870969976b7eac08ec729bf3f2a70c815512806d
parentfc6a0dc849d07c3aace5e06fa6eee01b45e83d68 (diff)
downloadcygnal-fac3c73ba0b0e0362dfa4648e1cd504ece77ece4.tar.gz
cygnal-fac3c73ba0b0e0362dfa4648e1cd504ece77ece4.tar.bz2
cygnal-fac3c73ba0b0e0362dfa4648e1cd504ece77ece4.zip
* include/paths.h (_PATH_MNTTAB): Define.
(_PATH_MOUNTED): Define. * include/mntent.h: Include paths.h. Define MNTTAB and MOUNTED as their paths.h equivalents. Add comment.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/include/mntent.h11
-rw-r--r--winsup/cygwin/include/paths.h4
3 files changed, 19 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 5246135e1..c828e9009 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2010-02-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/paths.h (_PATH_MNTTAB): Define.
+ (_PATH_MOUNTED): Define.
+ * include/mntent.h: Include paths.h. Define MNTTAB and MOUNTED as their
+ paths.h equivalents. Add comment.
+
2010-02-01 Christopher Faylor <me+cygwin@cgf.cx>
* dcrt0.cc (atexit_lock): Delete.
diff --git a/winsup/cygwin/include/mntent.h b/winsup/cygwin/include/mntent.h
index c284cc7c6..8ad270ba0 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 Red Hat, Inc.
+ Copyright 1996, 1998, 1999, 2000, 2001, 2006, 2009, 2010 Red Hat, Inc.
This file is part of Cygwin.
@@ -15,6 +15,8 @@ details. */
extern "C" {
#endif
+#include <paths.h>
+
struct mntent
{
char *mnt_fsname;
@@ -32,12 +34,17 @@ struct mntent *getmntent (FILE *__filep);
int endmntent (FILE *__filep);
#endif
+/* The following two defines are deprecated. Use the equivalent
+ names from paths.h instead. */
+#ifndef MNTTAB
+#define MNTTAB _PATH_MNTTAB
+#endif
/* This next file does exist, but the implementation of these
functions does not actually use it.
However, applications need the define to pass to setmntent().
*/
#ifndef MOUNTED
-#define MOUNTED "/etc/mtab"
+#define MOUNTED _PATH_MOUNTED
#endif
#ifdef __cplusplus
diff --git a/winsup/cygwin/include/paths.h b/winsup/cygwin/include/paths.h
index 11876cb29..8194f415b 100644
--- a/winsup/cygwin/include/paths.h
+++ b/winsup/cygwin/include/paths.h
@@ -1,6 +1,6 @@
/* paths.h
- Copyright 2001, 2002, 2003 Red Hat, Inc.
+ Copyright 2001, 2002, 2003, 2010 Red Hat, Inc.
This file is part of Cygwin.
@@ -19,6 +19,8 @@ details. */
#define _PATH_LASTLOG "/var/log/lastlog"
#define _PATH_MAN "/usr/share/man"
#define _PATH_MEM "/dev/mem"
+#define _PATH_MNTTAB "/etc/fstab"
+#define _PATH_MOUNTED "/etc/mtab"
#define _PATH_STDPATH "/bin:/usr/sbin:/sbin"
#define _PATH_TMP "/tmp/"
#define _PATH_TTY "/dev/tty"