]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/posix/sysconf.c
Remove internal usage of extensible stat functions
[thirdparty/glibc.git] / sysdeps / posix / sysconf.c
index a95e1b3f055ace6d6efcc5b6f97599957481fb49..8f7c4708df4047520d04b5a6d90a776451d25d94 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 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
@@ -13,7 +13,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
 #include <limits.h>
@@ -29,6 +29,7 @@
 #include <sys/stat.h>
 #include <sys/sysinfo.h>
 #include <sys/types.h>
+#include <sys/uio.h>
 #include <regex.h>
 
 #define NEED_SPEC_ARRAY 0
@@ -1115,11 +1116,7 @@ __sysconf (int name)
 #endif
 
     case _SC_STREAMS:
-#ifdef _XOPEN_STREAMS
-      return _XOPEN_STREAMS;
-#else
       return -1;
-#endif
 
     case _SC_HOST_NAME_MAX:
 #ifdef HOST_NAME_MAX
@@ -1219,7 +1216,7 @@ __sysconf_check_spec (const char *spec)
          spec, speclen + 1);
 
   struct stat64 st;
-  long int ret = __xstat64 (_STAT_VER, name, &st) >= 0 ? 1 : -1;
+  long int ret = __stat64 (name, &st) >= 0 ? 1 : -1;
 
   __set_errno (save_errno);
   return ret;