sysdep_headers += sys/feature_tests.h sys/dirent.h sys/utime.h sys/machelf.h \
sys/systeminfo.h sys/link.h sys/procfs_isa.h sys/ttold.h sys/procset.h \
sys/ptyvar.h sys/synch.h sys/fork.h sys/sockio.h sys/ioccom.h sys/tty.h \
- sys/trap.h sys/sysconfig.h sys/ptms.h sys/stack.h sys/regset.h \
- sys/fault.h sys/reg.h sys/siginfo.h sys/types32.h sys/isa_defs.h \
- sys/int_types.h sys/inttypes.h sys/atomic.h sys/machtypes.h sys/elf.h
+ sys/trap.h sys/sysconfig.h sys/ptms.h sys/stack.h sys/regset.h sys/fault.h \
+ sys/reg.h sys/siginfo.h sys/types32.h sys/isa_defs.h sys/int_types.h \
+ sys/inttypes.h sys/atomic.h sys/machtypes.h sys/elf.h sys/mnttab.h
sysdep_headers += rtld_db.h pcsample.h atomic.h bits/machtypes.h
headers := $(filter-out sys/sysinfo.h, $(headers))
endif
--- /dev/null
+/* Copyright (C) 1995, 1996, 2001, 2005, 2006, 2008
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+
+int
+attribute_hidden
+mknodat (int fd, const char *path, mode_t mode, dev_t dev)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (mknodat)
+#include <stub-tag.h>
#define MNTIOC ('m' << 8)
#define MNTIOC_GETMNTENT (MNTIOC|7)
-#define MNT_LINE_MAX 1024
-
-struct mnttab
- {
- char *mnt_special;
- char *mnt_mountp;
- char *mnt_fstype;
- char *mnt_mntopts;
- char *mnt_time;
- };
-
-struct extmnttab
- {
- char *mnt_special;
- char *mnt_mountp;
- char *mnt_fstype;
- char *mnt_mntopts;
- char *mnt_time;
- unsigned int mnt_major;
- unsigned int mnt_minor;
- };
-
extern int __getmntent_sun (FILE *fp, struct mnttab *mt);
extern char * __hasmntopt_sun (struct mnttab *mt, char *opt);
#include <string.h>
#include <ctype.h>
#include <sys/ioctl.h>
+#define _SUN_SOURCE
+#include <sys/mnttab.h>
/* Docs: http://docs.sun.com/app/docs/doc/816-5168/resetmnttab-3c */
#define _PATH_LASTLOG "/var/log/lastlog"
#define _PATH_MAN "/usr/man"
#define _PATH_MEM "/dev/mem"
-#define _PATH_MNTTAB "/etc/fstab"
-#define _PATH_MOUNTED "/var/run/mtab"
+#define _PATH_MNTTAB "/etc/vfstab"
+#define _PATH_MOUNTED "/etc/mnttab"
#define _PATH_NOLOGIN "/etc/nologin"
#define _PATH_PRESERVE "/var/preserve"
#define _PATH_RWHODIR "/var/rwho"
--- /dev/null
+/* Copyright (C) 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by David Bartley <dtbartle@csclub.uwaterloo.ca>, 2008.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _SYS_MNTTAB_H
+#define _SYS_MNTTAB_H
+
+#include <features.h>
+#include <paths.h>
+
+#ifndef _SUN_SOURCE
+# include <mntent.h>
+#else
+
+# define MNTTAB _PATH_MOUNTED
+# define MNT_LINE_MAX 1024
+
+# define MNT_TOOLONG 1
+# define MNT_TOOMANY 2
+# define MNT_TOOFEW 3
+
+# define mntnull(mp) ((mp)->mnt_special = (mp)->mnt_mountp = \
+ (mp)->mnt_fstype = (mp)->mnt_mntopts = (mp)->mnt_time = NULL)
+# define putmntent(fd, mp) (-1)
+
+struct mnttab
+ {
+ char *mnt_special;
+ char *mnt_mountp;
+ char *mnt_fstype;
+ char *mnt_mntopts;
+ char *mnt_time;
+ };
+
+/*
+ * NOTE: fields in extmnttab should match struct mnttab till new fields
+ * are encountered, this allows hasmntopt to work properly when its arg is
+ * a pointer to an extmnttab struct cast to a mnttab struct pointer.
+ */
+struct extmnttab
+ {
+ char *mnt_special;
+ char *mnt_mountp;
+ char *mnt_fstype;
+ char *mnt_mntopts;
+ char *mnt_time;
+ unsigned int mnt_major;
+ unsigned int mnt_minor;
+ };
+
+__BEGIN_DECLS
+
+extern void resetmnttab (FILE *);
+extern int getmntent (FILE *, struct mnttab *);
+extern int getextmntent (FILE *, struct extmnttab *, size_t);
+extern int getmntany (FILE *, struct mnttab *, struct mnttab *);
+extern char *hasmntopt (struct mnttab *, char *);
+extern char *mntopt (char **);
+
+__END_DECLS
+
+#endif /* _SUN_SOURCE */
+
+#endif /* _SYS_MNTTAB_H */
#ifndef _SYS_PARAM_H
#define _SYS_PARAM_H 1
-#ifdef _GNU_SOURCE
-# define MIN(a,b) (((a)<(b))?(a):(b))
-# define MAX(a,b) (((a)>(b))?(a):(b))
-#endif
-
#include <limits.h>
#include <features.h>
#include <sys/isa_defs.h>
+#ifndef MIN
+# define MIN(a,b) (((a)<(b))?(a):(b))
+#endif
+#ifndef MAX
+# define MAX(a,b) (((a)>(b))?(a):(b))
+#endif
+
/* BSD names for some <limits.h> values. */
#define NBBY CHAR_BIT
/* Maximum hostname length. */
#define MAXHOSTNAMELEN 256
-__BEGIN_DECLS
-extern long int sysconf (int __name) __THROW __attribute__ ((__const__));
-__END_DECLS
#define PAGESIZE sysconf(_SC_PAGESIZE)
#define MAXPID (pid_t)sysconf(_SC_MAXPID)
#define MAXEPHUID (uid_t)sysconf(_SC_EPHID_MAX)
#define NGROUPS_UMAX 32
#define NGROUPS_MAX_DEFAULT 16
-#include <sys/isa_defs.h>
-
#define MAXBSIZE 8192
#define DEV_BSIZE 512
#define DEV_BSHIFT 9
# define NZERO 20
#endif
+__BEGIN_DECLS
+
+extern long int sysconf (int __name) __THROW;
+
+__END_DECLS
+
#endif /* sys/param.h */