aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/Makefile2
-rw-r--r--misc/efgcvt_r.c2
-rw-r--r--misc/force-wrapper.c25
-rw-r--r--misc/hsearch_r.c8
-rw-r--r--misc/mntent.h31
5 files changed, 52 insertions, 16 deletions
diff --git a/misc/Makefile b/misc/Makefile
index 343cc3e..00f5f78 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -55,7 +55,7 @@ routines := brk sbrk sstk ioctl \
efgcvt efgcvt_r qefgcvt qefgcvt_r \
hsearch hsearch_r tsearch lsearch \
err error ustat \
- getsysstats
+ getsysstats force-wrapper
aux := init-misc
distribute := bsd-compat.c
extra-objs := bsd-compat.o
diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c
index cbd5c27..7f80242 100644
--- a/misc/efgcvt_r.c
+++ b/misc/efgcvt_r.c
@@ -51,7 +51,7 @@ APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len)
if (buf == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return -1;
}
diff --git a/misc/force-wrapper.c b/misc/force-wrapper.c
new file mode 100644
index 0000000..d8676a8
--- /dev/null
+++ b/misc/force-wrapper.c
@@ -0,0 +1,25 @@
+/* force-wrapper - Default definition of hook for wrapper
+Copyright (C) 1996 Free Software Foundation, Inc.
+This file is part of the GNU C Library.
+Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 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
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* The startup code for the reentrant version of GNU libc requires the
+ symbol `__libc_force_canceled_wrapper' to be defined. When
+ libpthread is used the symbol is defined there. Otherwise the
+ definition in this file is used. */
+const int __libc_force_cancel_wrapper = 0;
diff --git a/misc/hsearch_r.c b/misc/hsearch_r.c
index 151bb31..95813e4 100644
--- a/misc/hsearch_r.c
+++ b/misc/hsearch_r.c
@@ -70,7 +70,7 @@ hcreate_r (nel, htab)
/* Test for correct arguments. */
if (htab == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return 0;
}
@@ -105,7 +105,7 @@ hdestroy_r (htab)
/* Test for correct arguments. */
if (htab == NULL)
{
- errno = EINVAL;
+ __set_errno (EINVAL);
return;
}
@@ -147,7 +147,7 @@ hsearch_r (item, action, retval, htab)
error. */
if (action == ENTER && htab->filled == htab->size)
{
- errno = ENOMEM;
+ __set_errno (ENOMEM);
*retval = NULL;
return 0;
}
@@ -222,7 +222,7 @@ hsearch_r (item, action, retval, htab)
return 1;
}
- errno = ESRCH;
+ __set_errno (ESRCH);
*retval = NULL;
return 0;
}
diff --git a/misc/mntent.h b/misc/mntent.h
index 8fa93f7..150ad6d 100644
--- a/misc/mntent.h
+++ b/misc/mntent.h
@@ -27,11 +27,26 @@ Cambridge, MA 02139, USA. */
/* File listing canonical interesting mount points. */
#define _PATH_MNTTAB "/etc/fstab"
-#define MNTTAB _PATH_MNTTAB /* Deprecated alias. */
+#define MNTTAB _PATH_MNTTAB /* Deprecated alias. */
/* File listing currently active mount points. */
#define _PATH_MOUNTED "/var/run/mtab"
-#define MOUNTED _PATH_MOUNTED /* Deprecated alias. */
+#define MOUNTED _PATH_MOUNTED /* Deprecated alias. */
+
+
+/* General filesystem types. */
+#define MNTTYPE_IGNORE "ignore" /* Ignore this entry. */
+#define MNTTYPE_NFS "nfs" /* Network file system. */
+#define MNTTYPE_SWAP "swap" /* Swap device. */
+
+
+/* Generic mount options. */
+#define MNTOPT_DEFAULTS "defaults" /* Use all default options. */
+#define MNTOPT_RO "ro" /* Read only. */
+#define MNTOPT_RW "rw" /* Read/write. */
+#define MNTOPT_SUID "suid" /* Set uid allowed. */
+#define MNTOPT_NOSUID "nosuid" /* No set uid allowed. */
+#define MNTOPT_NOAUTO "noauto" /* Do not auto mount. */
__BEGIN_DECLS
@@ -50,10 +65,8 @@ struct mntent
/* Prepare to begin reading and/or writing mount table entries from the
beginning of FILE. MODE is as for `fopen'. */
-extern FILE *__setmntent __P ((__const char *__file,
- __const char *__mode));
-extern FILE *setmntent __P ((__const char *__file,
- __const char *__mode));
+extern FILE *__setmntent __P ((__const char *__file, __const char *__mode));
+extern FILE *setmntent __P ((__const char *__file, __const char *__mode));
/* Read one mount table entry from STREAM. Returns a pointer to storage
reused on the next call, or null for EOF or error (use feof/ferror to
@@ -72,10 +85,8 @@ extern struct mntent *getmntent_r __P ((FILE *__stream,
/* Write the mount table entry described by MNT to STREAM.
Return zero on success, nonzero on failure. */
-extern int __addmntent __P ((FILE *__stream,
- __const struct mntent *__mnt));
-extern int addmntent __P ((FILE *__stream,
- __const struct mntent *__mnt));
+extern int __addmntent __P ((FILE *__stream, __const struct mntent *__mnt));
+extern int addmntent __P ((FILE *__stream, __const struct mntent *__mnt));
/* Close a stream opened with `setmntent'. */
extern int __endmntent __P ((FILE *__stream));