summaryrefslogtreecommitdiff
path: root/sysdeps/stub
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/stub')
-rw-r--r--sysdeps/stub/getpagesize.c30
-rw-r--r--sysdeps/stub/lchown.c42
-rw-r--r--sysdeps/stub/lockfile.c4
-rw-r--r--sysdeps/stub/mkstemp.c27
-rw-r--r--sysdeps/stub/mktemp.c27
-rw-r--r--sysdeps/stub/sysconf.c98
6 files changed, 172 insertions, 56 deletions
diff --git a/sysdeps/stub/getpagesize.c b/sysdeps/stub/getpagesize.c
index 2c55df1a15..363151be21 100644
--- a/sysdeps/stub/getpagesize.c
+++ b/sysdeps/stub/getpagesize.c
@@ -1,26 +1,26 @@
/* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ 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 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 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.
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#include <errno.h>
-#include <stddef.h>
+#include <unistd.h>
/* Return the system page size. */
-size_t
+int
__getpagesize ()
{
__set_errno (ENOSYS);
diff --git a/sysdeps/stub/lchown.c b/sysdeps/stub/lchown.c
new file mode 100644
index 0000000000..f3aa2a1425
--- /dev/null
+++ b/sysdeps/stub/lchown.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1996 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 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. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+/* Change the owner and group of FILE. */
+int
+__lchown (file, owner, group)
+ const char *file;
+ uid_t owner;
+ gid_t group;
+{
+ if (file == NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (lchown)
+
+weak_alias (__lchown, lchown)
diff --git a/sysdeps/stub/lockfile.c b/sysdeps/stub/lockfile.c
index b3ccc7bca7..0328071c08 100644
--- a/sysdeps/stub/lockfile.c
+++ b/sysdeps/stub/lockfile.c
@@ -53,8 +53,8 @@ __internal_ftrylockfile (FILE *stream)
return 1;
}
#ifdef USE_IN_LIBIO
-weak_alias (__internal_ftrylockfile, __ftrylockfile)
-#else
weak_alias (__internal_ftrylockfile, _IO_ftrylockfile)
+#else
+weak_alias (__internal_ftrylockfile, __ftrylockfile)
#endif
weak_alias (__internal_ftrylockfile, ftrylockfile);
diff --git a/sysdeps/stub/mkstemp.c b/sysdeps/stub/mkstemp.c
index 47dd7125b3..ec78145ead 100644
--- a/sysdeps/stub/mkstemp.c
+++ b/sysdeps/stub/mkstemp.c
@@ -1,21 +1,22 @@
/* Copyright (C) 1992, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ 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 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 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.
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
+#include <stdlib.h>
#include <string.h>
#include <errno.h>
diff --git a/sysdeps/stub/mktemp.c b/sysdeps/stub/mktemp.c
index 06fe3de0c4..7780140a7a 100644
--- a/sysdeps/stub/mktemp.c
+++ b/sysdeps/stub/mktemp.c
@@ -1,21 +1,22 @@
/* Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ 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 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 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.
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
+#include <stdlib.h>
#include <string.h>
#include <errno.h>
diff --git a/sysdeps/stub/sysconf.c b/sysdeps/stub/sysconf.c
index 43ad6d93a9..00480fb2e9 100644
--- a/sysdeps/stub/sysconf.c
+++ b/sysdeps/stub/sysconf.c
@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+ 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 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 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.
+ 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., 675 Mass Ave,
-Cambridge, MA 02139, USA. */
+ 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. */
#include <errno.h>
#include <stdio.h>
@@ -87,6 +87,60 @@ __sysconf (name)
allocate a buffer we restrict the value. */
return BUFSIZ;
+ case _SC_CHAR_BIT:
+ return CHAR_BIT;
+
+ case _SC_CHAR_MAX:
+ return CHAR_MAX;
+
+ case _SC_CHAR_MIN:
+ return CHAR_MIN;
+
+ case _SC_INT_MAX:
+ return INT_MAX;
+
+ case _SC_INT_MIN:
+ return INT_MIN;
+
+ case _SC_LONG_BIT:
+ return sizeof (long int) * CHAR_BIT;
+
+ case _SC_WORD_BIT:
+ return sizeof (int) * CHAR_BIT;
+
+ case _SC_MB_LEN_MAX:
+ return MB_LEN_MAX;
+
+ case _SC_NZERO:
+ return NZERO;
+
+ case _SC_SSIZE_MAX:
+ return _POSIX_SSIZE_MAX;
+
+ case _SC_SCHAR_MAX:
+ return SCHAR_MAX;
+
+ case _SC_SCHAR_MIN:
+ return SCHAR_MIN;
+
+ case _SC_SHRT_MAX:
+ return SHRT_MAX;
+
+ case _SC_SHRT_MIN:
+ return SHRT_MIN;
+
+ case _SC_UCHAR_MAX:
+ return UCHAR_MAX;
+
+ case _SC_UINT_MAX:
+ return UINT_MAX;
+
+ case _SC_ULONG_MAX:
+ return ULONG_MAX;
+
+ case _SC_USHRT_MAX:
+ return USHRT_MAX;
+
case _SC_ARG_MAX:
case _SC_CHILD_MAX:
case _SC_CLK_TCK:
@@ -150,6 +204,9 @@ __sysconf (name)
case _SC_2_C_DEV:
case _SC_2_FORT_DEV:
case _SC_2_SW_DEV:
+ case _SC_2_CHAR_TERM:
+ case _SC_2_C_VERSION:
+ case _SC_2_UPE:
case _SC_THREADS:
case _SC_THREAD_SAFE_FUNCTIONS:
@@ -169,6 +226,21 @@ __sysconf (name)
case _SC_THREAD_PROCESS_SHARED:
case _SC_XOPEN_VERSION:
+ case _SC_XOPEN_XCU_VERSION:
+ case _SC_XOPEN_UNIX:
+ case _SC_XOPEN_CRYPT:
+ case _SC_XOPEN_ENH_I18N:
+ case _SC_XOPEN_SHM:
+ case _SC_XOPEN_XPG2:
+ case _SC_XOPEN_XPG3:
+ case _SC_XOPEN_XPG4:
+
+ case _SC_NL_ARGMAX:
+ case _SC_NL_LANGMAX:
+ case _SC_NL_MSGMAX:
+ case _SC_NL_NMAX:
+ case _SC_NL_SETMAX:
+ case _SC_NL_TEXTMAX:
break;
}