]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/posix/fpathconf.c
Prefer https to http for gnu.org and fsf.org URLs
[thirdparty/glibc.git] / sysdeps / posix / fpathconf.c
index a363a5965973b143cf788d782a7c0bbb27974715..8586428556048a2f90c3125b22129d94dd679e68 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2019 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 <stddef.h>
@@ -103,25 +103,22 @@ __fpathconf (int fd, int name)
 #endif
 
     case _PC_CHOWN_RESTRICTED:
-#ifdef _POSIX_CHOWN_RESTRICTED
-      return _POSIX_CHOWN_RESTRICTED;
-#else
-      return -1;
+#if _POSIX_CHOWN_RESTRICTED == -1
+# error "Invalid value for _POSIX_CHOWN_RESTRICTED"
 #endif
+      return _POSIX_CHOWN_RESTRICTED;
 
     case _PC_NO_TRUNC:
-#ifdef _POSIX_NO_TRUNC
-      return _POSIX_NO_TRUNC;
-#else
-      return -1;
+#if _POSIX_NO_TRUNC == -1
+# error "Invalid value for _POSIX_NO_TRUNC"
 #endif
+      return _POSIX_NO_TRUNC;
 
     case _PC_VDISABLE:
-#ifdef _POSIX_VDISABLE
-      return _POSIX_VDISABLE;
-#else
-      return -1;
+#if _POSIX_VDISABLE == -1
+# error "Invalid value for _POSIX_VDISABLE"
 #endif
+      return _POSIX_VDISABLE;
 
     case _PC_SYNC_IO:
 #ifdef _POSIX_SYNC_IO