]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Synchronize support/ infrastructure with master
authorFlorian Weimer <fweimer@redhat.com>
Mon, 15 Jan 2018 14:23:35 +0000 (15:23 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 15 Jan 2018 14:23:35 +0000 (15:23 +0100)
This commit updates the support/ subdirectory to
commit 1a51e46e4a87e1cd9528ac5e5656011636e4086b
on the master branch.

141 files changed:
scripts/backport-support.sh
support/Makefile
support/capture_subprocess.h
support/check.c
support/check.h
support/check_addrinfo.c
support/check_dns_packet.c
support/check_hostent.c
support/check_netent.c
support/check_nss.h
support/delayed_exit.c
support/format_nss.h
support/ignore_stderr.c
support/namespace.h
support/next_to_fault.c
support/next_to_fault.h
support/oom_error.c
support/resolv_test.c
support/resolv_test.h
support/run_diff.h
support/set_fortify_handler.c
support/support-xfstat.c
support/support-xstat.c
support/support.h
support/support_become_root.c
support/support_can_chroot.c
support/support_capture_subprocess.c
support/support_capture_subprocess_check.c
support/support_chroot.c
support/support_enter_mount_namespace.c
support/support_enter_network_namespace.c
support/support_format_address_family.c
support/support_format_addrinfo.c
support/support_format_dns_packet.c
support/support_format_herrno.c
support/support_format_hostent.c
support/support_format_netent.c
support/support_isolate_in_subprocess.c
support/support_record_failure.c
support/support_run_diff.c
support/support_shared_allocate.c
support/support_test_compare_failure.c
support/support_test_main.c
support/support_test_verify_impl.c
support/support_write_file_string.c
support/temp_file-internal.h
support/temp_file.c
support/temp_file.h
support/test-driver.c
support/test-driver.h
support/tst-support-namespace.c
support/tst-support_capture_subprocess.c
support/tst-support_format_dns_packet.c
support/tst-support_record_failure-2.sh
support/tst-support_record_failure.c
support/tst-test_compare.c
support/tst-xreadlink.c
support/write_message.c
support/xaccept.c
support/xaccept4.c
support/xasprintf.c
support/xbind.c
support/xcalloc.c
support/xchroot.c
support/xclose.c
support/xconnect.c
support/xdlfcn.c
support/xdlfcn.h
support/xdup2.c
support/xfclose.c
support/xfopen.c
support/xfork.c
support/xftruncate.c
support/xgetsockname.c
support/xlisten.c
support/xlseek.c
support/xmalloc.c
support/xmemstream.c
support/xmemstream.h
support/xmkdir.c
support/xmmap.c
support/xmprotect.c
support/xmunmap.c
support/xopen.c
support/xpipe.c
support/xpoll.c
support/xpthread_attr_destroy.c
support/xpthread_attr_init.c
support/xpthread_attr_setdetachstate.c
support/xpthread_attr_setguardsize.c
support/xpthread_attr_setstacksize.c
support/xpthread_barrier_destroy.c
support/xpthread_barrier_init.c
support/xpthread_barrier_wait.c
support/xpthread_cancel.c
support/xpthread_check_return.c
support/xpthread_cond_wait.c
support/xpthread_create.c
support/xpthread_detach.c
support/xpthread_join.c
support/xpthread_mutex_consistent.c
support/xpthread_mutex_destroy.c
support/xpthread_mutex_init.c
support/xpthread_mutex_lock.c
support/xpthread_mutex_unlock.c
support/xpthread_mutexattr_destroy.c
support/xpthread_mutexattr_init.c
support/xpthread_mutexattr_setprotocol.c
support/xpthread_mutexattr_setpshared.c
support/xpthread_mutexattr_setrobust.c
support/xpthread_mutexattr_settype.c
support/xpthread_once.c
support/xpthread_rwlock_init.c
support/xpthread_rwlock_rdlock.c
support/xpthread_rwlock_unlock.c
support/xpthread_rwlock_wrlock.c
support/xpthread_rwlockattr_init.c
support/xpthread_rwlockattr_setkind_np.c
support/xpthread_sigmask.c
support/xpthread_spin_lock.c
support/xpthread_spin_unlock.c
support/xraise.c
support/xreadlink.c
support/xrealloc.c
support/xrecvfrom.c
support/xsendto.c
support/xsetsockopt.c
support/xsigaction.c
support/xsignal.c
support/xsignal.h
support/xsocket.c
support/xsocket.h
support/xstdio.h
support/xstrdup.c
support/xstrndup.c
support/xsysconf.c
support/xthread.h
support/xunistd.h
support/xunlink.c
support/xwaitpid.c
support/xwrite.c

index 2ece7ce575e03a7591a3baf15b6568058fc3b4a7..4057e42d3c7370e4c4862d200083fc20052a18b4 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # Create a patch which backports the support/ subdirectory.
-# Copyright (C) 2017 Free Software Foundation, Inc.
+# Copyright (C) 2017-2018 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
index 8458840cd86fad8107f9e0dbfa0768b5dcf4bb0b..1bda81e55e519a57cd8b8c6838277649c2045c69 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile for support library, used only at build and test time
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
index 43caf9bce4675b66ee45e699aef458c6e1052123..b0886ba1d165263b2ebf84344de7c59b3e54d0e3 100644 (file)
@@ -1,5 +1,5 @@
 /* Capture output from a subprocess.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 592f2bc856e301d9cb151df8aaca69ae801b70af..78f2b3cde14bc0bdfbd1f99ebe09aac58f48f48f 100644 (file)
@@ -1,5 +1,5 @@
 /* Support code for reporting test results.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
@@ -18,6 +18,7 @@
 
 #include <support/check.h>
 
+#include <errno.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 static void
 print_failure (const char *file, int line, const char *format, va_list ap)
 {
+  int saved_errno = errno;
   printf ("error: %s:%d: ", file, line);
   vprintf (format, ap);
   puts ("");
+  errno = saved_errno;
 }
 
 int
index 55a6f09f42a53cf2cbdab3b0540e4bc2c7dc75fe..2192f38941af2515f814408db519228fbb6611e3 100644 (file)
@@ -1,5 +1,5 @@
 /* Functionality for reporting test results.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
@@ -86,6 +86,13 @@ void support_test_verify_exit_impl (int status, const char *file, int line,
    does not support reporting failures from a DSO.  */
 void support_record_failure (void);
 
+/* Static assertion, under a common name for both C++ and C11.  */
+#ifdef __cplusplus
+# define support_static_assert static_assert
+#else
+# define support_static_assert _Static_assert
+#endif
+
 /* Compare the two integers LEFT and RIGHT and report failure if they
    are different.  */
 #define TEST_COMPARE(left, right)                                       \
@@ -95,43 +102,30 @@ void support_record_failure (void);
     typedef __typeof__ (+ (right)) __right_type;                        \
     __left_type __left_value = (left);                                  \
     __right_type __right_value = (right);                               \
-    /* Prevent use with floating-point and boolean types.  */           \
-    _Static_assert ((__left_type) 1.0 == (__left_type) 1.5,             \
-                    "left value has floating-point type");              \
-    _Static_assert ((__right_type) 1.0 == (__right_type) 1.5,           \
-                    "right value has floating-point type");             \
+    int __left_is_positive = __left_value > 0;                          \
+    int __right_is_positive = __right_value > 0;                        \
+    /* Prevent use with floating-point types.  */                       \
+    support_static_assert ((__left_type) 1.0 == (__left_type) 1.5,      \
+                           "left value has floating-point type");       \
+    support_static_assert ((__right_type) 1.0 == (__right_type) 1.5,    \
+                           "right value has floating-point type");      \
     /* Prevent accidental use with larger-than-long long types.  */     \
-    _Static_assert (sizeof (__left_value) <= sizeof (long long),        \
-                    "left value fits into long long");                  \
-    _Static_assert (sizeof (__right_value) <= sizeof (long long),       \
+    support_static_assert (sizeof (__left_value) <= sizeof (long long), \
+                           "left value fits into long long");           \
+    support_static_assert (sizeof (__right_value) <= sizeof (long long), \
                     "right value fits into long long");                 \
-    /* Make sure that integer conversions does not alter the sign.   */ \
-    enum                                                                \
-    {                                                                   \
-      __left_is_unsigned = (__left_type) -1 > 0,                        \
-      __right_is_unsigned = (__right_type) -1 > 0,                      \
-      __unsigned_left_converts_to_wider = (__left_is_unsigned           \
-                                           && (sizeof (__left_value)    \
-                                               < sizeof (__right_value))), \
-      __unsigned_right_converts_to_wider = (__right_is_unsigned         \
-                                            && (sizeof (__right_value)  \
-                                                < sizeof (__left_value))) \
-    };                                                                  \
-    _Static_assert (__left_is_unsigned == __right_is_unsigned           \
-                    || __unsigned_left_converts_to_wider                \
-                    || __unsigned_right_converts_to_wider,              \
-                    "integer conversions may alter sign of operands");  \
     /* Compare the value.  */                                           \
-    if (__left_value != __right_value)                                  \
+    if (__left_value != __right_value                                   \
+        || __left_is_positive != __right_is_positive)                   \
       /* Pass the sign for printing the correct value.  */              \
       support_test_compare_failure                                      \
         (__FILE__, __LINE__,                                            \
-         #left, __left_value, __left_value < 0, sizeof (__left_type),   \
-         #right, __right_value, __right_value < 0, sizeof (__right_type)); \
+         #left, __left_value, __left_is_positive, sizeof (__left_type), \
+         #right, __right_value, __right_is_positive, sizeof (__right_type)); \
   })
 
-/* Internal implementation of TEST_COMPARE.  LEFT_NEGATIVE and
-   RIGHT_NEGATIVE are used to store the sign separately, so that both
+/* Internal implementation of TEST_COMPARE.  LEFT_POSITIVE and
+   RIGHT_POSITIVE are used to store the sign separately, so that both
    unsigned long long and long long arguments fit into LEFT_VALUE and
    RIGHT_VALUE, and the function can still print the original value.
    LEFT_SIZE and RIGHT_SIZE specify the size of the argument in bytes,
@@ -139,11 +133,11 @@ void support_record_failure (void);
 void support_test_compare_failure (const char *file, int line,
                                    const char *left_expr,
                                    long long left_value,
-                                   int left_negative,
+                                   int left_positive,
                                    int left_size,
                                    const char *right_expr,
                                    long long right_value,
-                                   int right_negative,
+                                   int right_positive,
                                    int right_size);
 
 
index c47f105ce65d6b38f57b227955f79260329d7e38..91ad7c56bdacf8a0d74848212fab1f9627fcd803 100644 (file)
@@ -1,5 +1,5 @@
 /* Compare struct addrinfo values against a formatted string.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 6d14bd90c045f0890fdc66d9e40dc23b912ef6a8..6c1277bd670da5bf94f24b1d54a733205e209377 100644 (file)
@@ -1,5 +1,5 @@
 /* Check that a DNS packet buffer has the expected contents.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 47fb8bc3326cc1065243ede02e30a8bfc40ad189..56384f9b03ca419abd6388532bd652ce6f530da7 100644 (file)
@@ -1,5 +1,5 @@
 /* Compare struct hostent values against a formatted string.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 80b69309b450bccdceb380f58c53b3edd799fc71..cbcbfb14e52314c90154a2c656bef5e577792bb6 100644 (file)
@@ -1,5 +1,5 @@
 /* Compare struct netent values against a formatted string.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 2893f2c2957eb94b2ba51ef4de5174851e709bf9..6aa28fa24e948c2fb87aba18e8a236dbaac42874 100644 (file)
@@ -1,5 +1,5 @@
 /* Test verification functions for NSS- and DNS-related data.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 67442f95df3f4e9b1849bec7f8f783a91e286401..2780d9a6fe61ac5e4b04547ad9c13e1259809cd1 100644 (file)
@@ -1,5 +1,5 @@
 /* Time-triggered process termination.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index fb4597c2384d70a1d5d4a1973133bcb46dc20130..e55354e788313587ee0d836d54482379e59d4222 100644 (file)
@@ -1,5 +1,5 @@
 /* String formatting functions for NSS- and DNS-related data.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 7b77a2cd56828f9f9b01891fdf5acb9de43b3db2..450333ad38a6223311875f4b1e17b8249434363a 100644 (file)
@@ -1,5 +1,5 @@
 /* Avoid all the buffer overflow messages on stderr.
-   Copyright (C) 2015-2017 Free Software Foundation, Inc.
+   Copyright (C) 2015-2018 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
index b5e2d1474aa6fb5c518bb56e9ac8ce4329e7dd2c..3c3842a49bb2880cd0881675df9398676cae90b0 100644 (file)
@@ -1,5 +1,5 @@
 /* Entering namespaces for test case isolation.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 7c6b0778986fed88328a374a009232d32013c476..1971bf7cd7d95c9cc45fbe2f3eeb5bd2c160dde9 100644 (file)
@@ -1,5 +1,5 @@
 /* Memory allocation next to an unmapped page.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index dd71c28ac06a4a069d8a0812cdb73594eb15999a..75759b586c56ec77e858bd30d15c302a6428a2f5 100644 (file)
@@ -1,5 +1,5 @@
 /* Memory allocation next to an unmapped page.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 78169782736a76271c8be9c602d3cb049c209c3c..fd87fe23059ba61d474982c93df8f3606566c771 100644 (file)
@@ -1,5 +1,5 @@
 /* Reporting out-of-memory errors.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 1625dcf43a204434d395a6fbf8524d06c5f403fc..3f2a09f36f44587838abe05d3257feb8de353e08 100644 (file)
@@ -1,5 +1,5 @@
 /* DNS test framework and libresolv redirection.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
@@ -43,15 +43,99 @@ enum
     max_response_length = 65536
   };
 
-/* List of pointers to be freed.  The hash table implementation
-   (struct hsearch_data) does not provide a way to deallocate all
-   objects, so this approach is used to avoid memory leaks.  */
-struct to_be_freed
+/* Used for locating domain names containing for the purpose of
+   forming compression references.  */
+struct compressed_name
 {
-  struct to_be_freed *next;
-  void *ptr;
+  uint16_t offset;
+  unsigned char length;
+  unsigned char name[];         /* Without terminating NUL.  */
 };
 
+static struct compressed_name *
+allocate_compressed_name (const unsigned char *encoded, unsigned int offset)
+{
+  /* Compute the length of the domain name.  */
+  size_t length;
+  {
+    const unsigned char *p;
+    for (p = encoded; *p != '\0';)
+      {
+        /* No compression references are allowed.  */
+        TEST_VERIFY (*p <= 63);
+        /* Skip over the label.  */
+        p += 1 + *p;
+      }
+    length = p - encoded;
+    ++length;                   /* For the terminating NUL byte.  */
+  }
+  TEST_VERIFY_EXIT (length <= 255);
+
+  struct compressed_name *result
+    = xmalloc (offsetof (struct compressed_name, name) + length);
+  result->offset = offset;
+  result->length = length;
+  memcpy (result->name, encoded, length);
+  return result;
+}
+
+/* Convert CH to lower case.  Only change letters in the ASCII
+   range.  */
+static inline unsigned char
+ascii_tolower (unsigned char ch)
+{
+  if ('A' <= ch && ch <= 'Z')
+    return ch - 'A' + 'a';
+  else
+    return ch;
+}
+
+/* Compare both names, for use with tsearch.  The order is arbitrary,
+   but the comparison is case-insenstive.  */
+static int
+compare_compressed_name (const void *left, const void *right)
+{
+  const struct compressed_name *crleft = left;
+  const struct compressed_name *crright = right;
+
+  if (crleft->length != crright->length)
+    /* The operands are converted to int before the subtraction.  */
+    return crleft->length - crright->length;
+
+  const unsigned char *nameleft = crleft->name;
+  const unsigned char *nameright = crright->name;
+
+  while (true)
+    {
+      int lenleft = *nameleft++;
+      int lenright = *nameright++;
+
+      /* Labels must not e compression references.  */
+      TEST_VERIFY (lenleft <= 63);
+      TEST_VERIFY (lenright <= 63);
+
+      if (lenleft != lenright)
+        return left - right;
+      if (lenleft == 0)
+        /* End of name reached without spotting a difference.  */
+        return 0;
+      /* Compare the label in a case-insenstive manner.  */
+      const unsigned char *endnameleft = nameleft + lenleft;
+      while (nameleft < endnameleft)
+        {
+          int l = *nameleft++;
+          int r = *nameright++;
+          if (l != r)
+            {
+              l = ascii_tolower (l);
+              r = ascii_tolower (r);
+              if (l != r)
+                return l - r;
+            }
+        }
+    }
+}
+
 struct resolv_response_builder
 {
   const unsigned char *query_buffer;
@@ -67,11 +151,8 @@ struct resolv_response_builder
      written RDATA sub-structure.  0 if no RDATA is being written.  */
   size_t current_rdata_offset;
 
-  /* Hash table for locating targets for label compression.  */
-  struct hsearch_data compression_offsets;
-  /* List of pointers which need to be freed.  Used for domain names
-     involved in label compression.  */
-  struct to_be_freed *to_be_freed;
+  /* tsearch tree for locating targets for label compression.  */
+  void *compression_offsets;
 
   /* Must be last.  Not zeroed for performance reasons.  */
   unsigned char buffer[max_response_length];
@@ -79,18 +160,6 @@ struct resolv_response_builder
 
 /* Response builder. */
 
-/* Add a pointer to the list of pointers to be freed when B is
-   deallocated.  */
-static void
-response_push_pointer_to_free (struct resolv_response_builder *b, void *ptr)
-{
-  if (ptr == NULL)
-    return;
-  struct to_be_freed *e = xmalloc (sizeof (*e));
-  *e = (struct to_be_freed) {b->to_be_freed, ptr};
-  b->to_be_freed = e;
-}
-
 void
 resolv_response_init (struct resolv_response_builder *b,
                       struct resolv_response_flags flags)
@@ -194,120 +263,88 @@ void
 resolv_response_add_name (struct resolv_response_builder *b,
                           const char *const origname)
 {
-  /* Normalized name.  */
-  char *name;
-  /* Normalized name with case preserved.  */
-  char *name_case;
-  {
-    size_t namelen = strlen (origname);
-    /* Remove trailing dots.  FIXME: Handle trailing quoted dots.  */
-    while (namelen > 0 && origname[namelen - 1] == '.')
-      --namelen;
-    name = xmalloc (namelen + 1);
-    name_case = xmalloc (namelen + 1);
-    /* Copy and convert to lowercase.  FIXME: This needs to normalize
-       escaping as well.  */
-    for (size_t i = 0; i < namelen; ++i)
-      {
-        char ch = origname[i];
-        name_case[i] = ch;
-        if ('A' <= ch && ch <= 'Z')
-          ch = ch - 'A' + 'a';
-        name[i] = ch;
-      }
-    name[namelen] = 0;
-    name_case[namelen] = 0;
-  }
-  char *name_start = name;
-  char *name_case_start = name_case;
+  unsigned char encoded_name[NS_MAXDNAME];
+  if (ns_name_pton (origname, encoded_name, sizeof (encoded_name)) < 0)
+    FAIL_EXIT1 ("ns_name_pton (\"%s\"): %m", origname);
 
-  bool compression = false;
-  while (*name)
+  /* Copy the encoded name into the output buffer, apply compression
+     where possible.  */
+  for (const unsigned char *name = encoded_name; ;)
     {
-      /* Search for a previous name we can reference.  */
-      ENTRY new_entry =
+      if (*name == '\0')
         {
-          .key = name,
-          .data = (void *) (uintptr_t) b->offset,
-        };
+          /* We have reached the end of the name.  Add the terminating
+             NUL byte.  */
+          response_add_byte (b, '\0');
+          break;
+        }
 
-      /* If the label can be a compression target because it is at a
-         reachable offset, add it to the hash table.  */
-      ACTION action;
-      if (b->offset < (1 << 12))
-        action = ENTER;
-      else
-        action = FIND;
+      /* Set to the compression target if compression is possible.  */
+      struct compressed_name *crname_target;
 
-      /* Search for known compression offsets in the hash table.  */
-      ENTRY *e;
-      if (hsearch_r (new_entry, action, &e, &b->compression_offsets) == 0)
-        {
-          if (action == FIND && errno == ESRCH)
-            /* Fall through.  */
-            e = NULL;
-          else
-            FAIL_EXIT1 ("hsearch_r failure in name compression: %m");
-        }
+      /* Compression references can only reach the beginning of the
+         packet.  */
+      enum { compression_limit = 1 << 12 };
+
+      {
+        /* The trailing part of the name to be looked up in the tree
+           with the compression targets.  */
+        struct compressed_name *crname
+          = allocate_compressed_name (name, b->offset);
+
+        if (b->offset < compression_limit)
+          {
+            /* Add the name to the tree, for future compression
+               references.  */
+            void **ptr = tsearch (crname, &b->compression_offsets,
+                                  compare_compressed_name);
+            if (ptr == NULL)
+              FAIL_EXIT1 ("tsearch out of memory");
+            crname_target = *ptr;
+
+            if (crname_target != crname)
+              /* The new name was not actually added to the tree.
+                 Deallocate it.  */
+              free (crname);
+            else
+              /* Signal that the tree did not yet contain the name,
+                 but keep the allocation because it is now part of the
+                 tree.  */
+              crname_target = NULL;
+          }
+        else
+          {
+            /* This name cannot be reached by a compression reference.
+               No need to add it to the tree for future reference.  */
+            void **ptr = tfind (crname, &b->compression_offsets,
+                                compare_compressed_name);
+            if (ptr != NULL)
+              crname_target = *ptr;
+            else
+              crname_target = NULL;
+            TEST_VERIFY (crname_target != crname);
+            /* Not added to the tree.  */
+            free (crname);
+          }
+      }
 
-      /* The name is known.  Reference the previous location.  */
-      if (e != NULL && e->data != new_entry.data)
+      if (crname_target != NULL)
         {
-          size_t old_offset = (uintptr_t) e->data;
+          /* The name is known.  Reference the previous location.  */
+          unsigned int old_offset = crname_target->offset;
+          TEST_VERIFY_EXIT (old_offset < compression_limit);
           response_add_byte (b, 0xC0 | (old_offset >> 8));
           response_add_byte (b, old_offset);
-          compression = true;
           break;
         }
-
-      /* The name does not exist yet.  Write one label.  First, add
-         room for the label length.  */
-      size_t buffer_label_offset = b->offset;
-      response_add_byte (b, 0);
-
-      /* Copy the label.  */
-      while (true)
+      else
         {
-          char ch = *name_case;
-          if (ch == '\0')
-            break;
-          ++name;
-          ++name_case;
-          if (ch == '.')
-            break;
-          /* FIXME: Handle escaping.  */
-          response_add_byte (b, ch);
+          /* The name is new.  Add this label.  */
+          unsigned int len = 1 + *name;
+          resolv_response_add_data (b, name, len);
+          name += len;
         }
-
-      /* Patch in the label length.  */
-      size_t label_length = b->offset - buffer_label_offset - 1;
-      if (label_length == 0)
-        FAIL_EXIT1 ("empty label in name compression: %s", origname);
-      if (label_length > 63)
-        FAIL_EXIT1 ("label too long in name compression: %s", origname);
-      b->buffer[buffer_label_offset] = label_length;
-
-      /* Continue with the tail of the name and the next label.  */
-    }
-
-  if (compression)
-    {
-      /* If we found an immediate match for the name, we have not put
-         it into the hash table, and can free it immediately.  */
-      if (name == name_start)
-        free (name_start);
-      else
-        response_push_pointer_to_free (b, name_start);
-    }
-  else
-    {
-      /* Terminate the sequence of labels.  With compression, this is
-         implicit in the compression reference.  */
-      response_add_byte (b, 0);
-      response_push_pointer_to_free (b, name_start);
     }
-
-  free (name_case_start);
 }
 
 void
@@ -403,22 +440,13 @@ response_builder_allocate
   memset (b, 0, offsetof (struct resolv_response_builder, buffer));
   b->query_buffer = query_buffer;
   b->query_length = query_length;
-  TEST_VERIFY_EXIT (hcreate_r (10000, &b->compression_offsets) != 0);
   return b;
 }
 
 static void
 response_builder_free (struct resolv_response_builder *b)
 {
-  struct to_be_freed *current = b->to_be_freed;
-  while (current != NULL)
-    {
-      struct to_be_freed *next = current->next;
-      free (current->ptr);
-      free (current);
-      current = next;
-    }
-  hdestroy_r (&b->compression_offsets);
+  tdestroy (b->compression_offsets, free);
   free (b);
 }
 
index b953dc12000742465b75a2092f95c92718318ab5..4c2e6c1b417f5fcd7d3b5113f66c633e9105afc3 100644 (file)
@@ -1,5 +1,5 @@
 /* DNS test framework and libresolv redirection.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index f65b5dd22cf33327d26b8285b5d37f4461099a9c..6e949226fa4fed75bd8095715d3f0fb24053c83b 100644 (file)
@@ -1,5 +1,5 @@
 /* Invoke the system diff tool to compare two strings.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index f434a8082a2b1149a8ac136ac99701c4d04de9e7..c2dacbb179fb96beb1bfb47cdf9af06382aaf0be 100644 (file)
@@ -1,5 +1,5 @@
 /* Set signal handler for use in fortify tests.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 4c8ee9142b8c3053a01ebb4b96565226a32b29ce..f69253af0998dbfd24f5966ce6e8bf7ae84e70c5 100644 (file)
@@ -1,5 +1,5 @@
 /* fstat64 with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 86a81ec60153ae32e38523a86998755b996bec1d..fc10c6dcb781e6f11cd641835d71f603aa4ed3bd 100644 (file)
@@ -1,5 +1,5 @@
 /* stat64 with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index bbba803ba114c36fce358d62c63ce61162f36f2a..bc5827ed87d0d96c0a16d64fed1e90f319ea4f77 100644 (file)
@@ -1,5 +1,5 @@
 /* Common extra functions.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 933138f99fdedbf7e3d20bfc4985e98b3cec7ac3..6947dbaa8077913cb24df872df260b9b07ac61e2 100644 (file)
@@ -1,5 +1,5 @@
 /* Acquire root privileges.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index a462753f765eceb6a81d05640f8174c0f27dc9c1..8922576d19a2781395021641cf7580b6427ffcab 100644 (file)
@@ -1,5 +1,5 @@
 /* Return true if the process can perform a chroot operation.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 030f12425260833a3e54f3ecb16cd1e19ecb1cba..6d2029e13bd6ae73dd3ef55592e7246446a7a102 100644 (file)
@@ -1,5 +1,5 @@
 /* Capture output from a subprocess.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index e1cf73b6a578156d8eec2fdddf1c685dd10bd8ec..ff5ee89fb02599ae5206f21745046dd8f888ed42 100644 (file)
@@ -1,5 +1,5 @@
 /* Verify capture output from a subprocess.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 693813f6944fe697c7a8dbd67fc55300390d9eb1..6356b1af6cf410e4e324b247924c61f1e94d6553 100644 (file)
@@ -1,5 +1,5 @@
 /* Setup a chroot environment for use within tests.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 614069207565c2e2b1b7fe975f5f5a87e584f138..ba68e990f277dfd6aed4fbdf3b545fb3b378c6b4 100644 (file)
@@ -1,5 +1,5 @@
 /* Enter a mount namespace.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
@@ -20,7 +20,9 @@
 
 #include <sched.h>
 #include <stdio.h>
-#include <sys/mount.h>
+#ifdef CLONE_NEWNS
+# include <sys/mount.h>
+#endif /* CLONE_NEWNS */
 
 bool
 support_enter_mount_namespace (void)
index 28b0ee29cffe00e44ba09ff57f65f2f3ed253c78..1d874df8854eca4cf757e3bb2ea71583fcea8cb4 100644 (file)
@@ -1,5 +1,5 @@
 /* Enter a network namespace.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 5d42c42a4537782099309ed0304b08264189cc34..2acb9afffd4016e13327eb7515b0aeeacc4a47d2 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert an address family to a string.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index daf335f775276f7a201d3ab89b18caff7361e77e..c5e00e516a8279f7a9a4656d0be91ed41bc029fe 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert struct addrinfo values to a string.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index e5ef1aa4b35de509c96ff46fc1dbd22750b16da5..1170eafb0f008fee85a823850839e9a05fd5165a 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert a DNS packet to a human-readable representation.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 493d6ae962be1a5575fdf7dd60d4321a2e25981f..3d2dc8b27a59540eb5c99763dc5d25adff8b3f49 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert a h_errno error code to a string.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 0aac17972b4e4db8260a4c26a661ecfc7a0fceba..a4a62afe0a23c02c5b6b4d0e5e99bf820b75e9af 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert a struct hostent object to a string.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index be8f1720a2c98d92a9722fec605b0b29def03a70..0d15e784401005a1bd734c16d1a71f9735c27b67 100644 (file)
@@ -1,5 +1,5 @@
 /* Convert a struct netent object to a string.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index cf4861438303454e73576561931b2300cfa1b4ac..25edc003852d16591240df5ec4739ec6b4841588 100644 (file)
@@ -1,5 +1,5 @@
 /* Run a function in a subprocess.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 684055c7467dc7b03e5b331cc3b4570ce1053607..356798f55608ca7116be84aa6c76ff62d0b1732b 100644 (file)
@@ -1,5 +1,5 @@
 /* Global test failure counter.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index f5155de72749cacd89e780ab0c654a37f5dffa6a..f24f6c328110f8051f33a7356ea8487f00338fd2 100644 (file)
@@ -1,5 +1,5 @@
 /* Invoke the system diff tool to compare two strings.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 61d088e8cf5171be06a5eb6f8d5394cdfa20943a..8ab43c4b380f59e8bbdcc14b5453b1a41f09c57a 100644 (file)
@@ -1,5 +1,5 @@
 /* Allocate a memory region shared across processes.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 894145b56d2d6b177596f2c7dd1247a5f5d74a9d..8eb51c439dfe175c88682329c25f9cbc08bcd555 100644 (file)
@@ -1,5 +1,5 @@
 /* Reporting a numeric comparison failure.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <errno.h>
 #include <stdio.h>
 #include <support/check.h>
 
 static void
-report (const char *which, const char *expr, long long value, int negative,
+report (const char *which, const char *expr, long long value, int positive,
         int size)
 {
   printf ("  %s: ", which);
-  if (negative)
-    printf ("%lld", value);
-  else
+  if (positive)
     printf ("%llu", (unsigned long long) value);
+  else
+    printf ("%lld", value);
   unsigned long long mask
     = (~0ULL) >> (8 * (sizeof (unsigned long long) - size));
   printf (" (0x%llx); from: %s\n", (unsigned long long) value & mask, expr);
@@ -37,19 +38,21 @@ void
 support_test_compare_failure (const char *file, int line,
                               const char *left_expr,
                               long long left_value,
-                              int left_negative,
+                              int left_positive,
                               int left_size,
                               const char *right_expr,
                               long long right_value,
-                              int right_negative,
+                              int right_positive,
                               int right_size)
 {
+  int saved_errno = errno;
   support_record_failure ();
   if (left_size != right_size)
     printf ("%s:%d: numeric comparison failure (widths %d and %d)\n",
             file, line, left_size * 8, right_size * 8);
   else
     printf ("%s:%d: numeric comparison failure\n", file, line);
-  report (" left", left_expr, left_value, left_negative, left_size);
-  report ("right", right_expr, right_value, right_negative, right_size);
+  report (" left", left_expr, left_value, left_positive, left_size);
+  report ("right", right_expr, right_value, right_positive, right_size);
+  errno = saved_errno;
 }
index 3c411a467b04f4dec279ddb84841d1d2f6d56e70..396385729b6809adf4d06a2e26e5a76b33508e03 100644 (file)
@@ -1,5 +1,5 @@
 /* Main worker function for the test driver.
-   Copyright (C) 1998-2017 Free Software Foundation, Inc.
+   Copyright (C) 1998-2018 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
index 55ab2111b3d0d7dcb032f8483d18cb1d45b12513..5ff5555a6a6cce32380913ccb50c907eb2ac0f51 100644 (file)
@@ -1,5 +1,5 @@
 /* Implementation of the TEST_VERIFY and TEST_VERIFY_EXIT macros.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
 
 #include <support/check.h>
 
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 
 void
 support_test_verify_impl (const char *file, int line, const char *expr)
 {
+  int saved_errno = errno;
   support_record_failure ();
   printf ("error: %s:%d: not true: %s\n", file, line, expr);
+  errno = saved_errno;
 }
 
 void
index 48736530bfb8f8d44489c178359aa217dc422408..7505679401ed8c07ac4600db5e3b8594bd14ecfd 100644 (file)
@@ -1,5 +1,5 @@
 /* Write a string to a file.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index fb6cceb0658b10a691448ee1cc75e9bb399db35a..4cee3c0c35458aa2ab342bc6c31a5ac2ca3056af 100644 (file)
@@ -1,5 +1,5 @@
 /* Internal weak declarations for temporary file handling.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 547263a3e4ba11d82de3a99ef752c7db9ad9b367..0bbc7f997264f75813ecfa2e7e3e4ac33487a8fd 100644 (file)
@@ -1,5 +1,5 @@
 /* Temporary file handling for tests.
-   Copyright (C) 1998-2017 Free Software Foundation, Inc.
+   Copyright (C) 1998-2018 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
index 3b8563e1157191805e76281eb007ce0a36bf6c24..c7795cc577ca22a95bf44a3e193dbe496b5aaa8c 100644 (file)
@@ -1,5 +1,5 @@
 /* Declarations for temporary file handling.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 47c387c2b485bc8415a17b1ce56fb6f49769a58d..09c8783e4f54d8094d6827aba704a55a23c8fb7e 100644 (file)
@@ -1,5 +1,5 @@
 /* Main function for test programs.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index a8fe9c3565cddbe3b4fe054202742acafbc43179..1708d68d608ee4a497bcfcf95ef8ca3518ec53e3 100644 (file)
@@ -1,5 +1,5 @@
 /* Interfaces for the test driver.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index dbe7cc07c8f8aaa4eb4701362468c5754cffaa7a..e20423c4a30cb8b1d1f4bebfbb410ae644f4133c 100644 (file)
@@ -1,5 +1,5 @@
 /* Test entering namespaces.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 5672fba0f7f4d94c2eebe05d659dc1f25b6b55c0..a68525609147676858c139a57f03783c74963646 100644 (file)
@@ -1,5 +1,5 @@
 /* Test capturing output from a subprocess.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 9c8589c09c1949154b5e1da0cc3ca5d77c3bc953..b1135eebc6c02d55210fa4bfa859d173d32cb4b9 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests for the support_format_dns_packet function.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 2c9372cc2916220e963baba0cc3e09105648e2c6..09cd96290a014b7e03e13e9ec9a23978233675a9 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Test failure recording (with and without --direct).
-# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+# Copyright (C) 2016-2018 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
index e739e739c399cb94449449bd14a465f23b4becc3..8757f2da029d5abeaf59c4a0982ce440dd9b2cb4 100644 (file)
@@ -1,5 +1,5 @@
 /* Test support_record_failure state sharing.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index de138d4f8aaabd1f8208c302bb40ee79b8cb9bf2..123ba1bc3c9aeb8035bc07a031aeb9aa6ef91b0e 100644 (file)
@@ -1,5 +1,5 @@
 /* Basic test for the TEST_COMPARE macro.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
@@ -42,6 +42,22 @@ struct bitfield
   unsigned long long int u63 : 63;
 };
 
+/* Functions which return signed sizes are common, so test that these
+   results can readily checked using TEST_COMPARE.  */
+
+static int
+return_ssize_t (void)
+{
+  return 4;
+}
+
+static int
+return_int (void)
+{
+  return 4;
+}
+
+
 static int
 do_test (void)
 {
@@ -53,6 +69,8 @@ do_test (void)
     unsigned short u16 = 3;
     TEST_COMPARE (i8, u16);
   }
+  TEST_COMPARE (return_ssize_t (), sizeof (char[4]));
+  TEST_COMPARE (return_int (), sizeof (char[4]));
 
   struct bitfield bitfield = { 0 };
   TEST_COMPARE (bitfield.i2, bitfield.i3);
index a4a22812c14c6453d3d5a70d83772a1da839952f..b14220722800de47f2c5290d02f85dd0f95fdd92 100644 (file)
@@ -1,5 +1,5 @@
 /* Test the xreadlink function.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index f03ed931d6b0fdef192de057e40df6a06d468b9b..a3e2f90535aa87cfbcf344f81672a712b08ba0b9 100644 (file)
@@ -1,5 +1,5 @@
 /* Write a message to standard output.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
 
 #include <support/support.h>
 
+#include <errno.h>
 #include <string.h>
 #include <unistd.h>
 
 void
 write_message (const char *message)
 {
+  int saved_errno = errno;
   ssize_t unused __attribute__ ((unused));
   unused = write (STDOUT_FILENO, message, strlen (message));
+  errno = saved_errno;
 }
index 7b25af3b053206e47ca802fea8a75e72a551fced..fd65fc6c3af27e9f80785a7e40cade56d7e6882f 100644 (file)
@@ -1,5 +1,5 @@
 /* accept with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 67dd95e9fbbb3e1e0bd32350add0495bf1ca3fa3..ada3c92267e8bb19defec5ccfe99dc7f73e79dea 100644 (file)
@@ -1,5 +1,5 @@
 /* accept4 with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 5157680fa25036f293a2ac36dfd5834de04ed432..e593ec5e82b7ec1411686e916d8d502dd271cad3 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrapper for asprintf.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index cfc6dd8fa86fe8001d8c77416705e3108fa34686..938e7c07d6de3e29e46b3efeafb66d2b377c728c 100644 (file)
@@ -1,5 +1,5 @@
 /* bind with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 135f42dab2dabc4a1036795e735348733ae13e56..403569041f662243ea0f1f74c54622c4d9189547 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrapper for calloc.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index abcc299e003b397f792946c92fb8b715d33c243e..d4759a1bd1f58d47c3ec9b0d6d6b4b7679a1364b 100644 (file)
@@ -1,5 +1,5 @@
 /* chroot with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index c931e084216c906dbb14ba03f5326c5baeceb5a6..702bef6c6eba1c75433d17812fcaada6bba8472a 100644 (file)
@@ -1,5 +1,5 @@
 /* close with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 0266dbc643c827cff2711f9d43ef1394640b01ef..341805d80d802da682fd47dd446a06bafaba2732 100644 (file)
@@ -1,5 +1,5 @@
 /* connect with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 05966c41ef06efc79b733dfd203adba50a7e5748..f34bb059c00f27f71bd9a160f965620c196dda6d 100644 (file)
@@ -1,5 +1,5 @@
 /* Support functionality for using dlopen/dlclose/dlsym.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 9bdcb38d3e230393ad0251b871e8777571581fc6..5ab7494e70924f52e6aa25979bb910100f024397 100644 (file)
@@ -1,5 +1,5 @@
 /* Support functionality for using dlopen/dlclose/dlsym.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index dc08c945182008ffe33bec6d09bdf9800479b8bf..b8c4c223fb7d532351be6f75cb931f4c820ad8b2 100644 (file)
@@ -1,5 +1,5 @@
 /* dup2 with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 2737f0504495a7d80ff89240c88801d5c5097bb9..39d46f042a71791e86057e29316968f6a5b30a3f 100644 (file)
@@ -1,5 +1,5 @@
 /* fclose with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 14532a09f3c12332207b0e2dd0811de71dbc18ff..fb931cf22b45fe39f540de029a11dea648b6e179 100644 (file)
@@ -1,5 +1,5 @@
 /* fopen with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index aa52ba62c52cf80401492a11574705796b7f5147..dffa2a13d068656ebbc0871e1817667e69b0e515 100644 (file)
@@ -1,5 +1,5 @@
 /* fork with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 9c4e9e3050f9fefbe0a2a92fcd4730e6b70929f8..27c7e12ba2b648a754b39c634f81261f44a604b6 100644 (file)
@@ -1,5 +1,5 @@
 /* ftruncate with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index c3bd884f8dbeb685862e080a57311439441f5ce8..797194f79d813b4c0f077ad321f1b02f17285f5f 100644 (file)
@@ -1,5 +1,5 @@
 /* getsockname with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 1953e5900a930c16e127245d595bff712cf0d295..aa70091adb6a54069a592101c42c5b96c25b85cc 100644 (file)
@@ -1,5 +1,5 @@
 /* listen with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 0a75a9f2e60e204147adc1391dc8a80434269a21..24229399086f94bbe466220ed43dc4e63ff1688f 100644 (file)
@@ -1,5 +1,5 @@
 /* lseek with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 450f6997893eecb1ebf09a64d351d9f8256c953e..78317e2b127cd3d550187dafb2c17dbd5bc85976 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrapper for malloc.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index bce6dc917002e5d98f5156197bc19c54be00f52d..df5fbc489a2d9b7411865b9fd0517c80db5a2322 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrappers for memstream functions.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index e5ba231e4d59aaed87f2d628d2ec7d007874e11e..2d4a577f292232925b4dcd3b0633229058ff9346 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrappers for memstream functions.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index ea17d49391866d3dc37bf74a9d11d7ff9a9210bc..7e67f783de6d3090dcec41fda31136a9e19060fa 100644 (file)
@@ -1,5 +1,5 @@
 /* mkdir with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 435b1eb73334dea85e4eda6fd6135d5abea6edb3..d580c070138878ec8b5c6eeec63b9149a2e76156 100644 (file)
@@ -1,5 +1,5 @@
 /* mmap with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 9410251c3227a11b90bc7cddee09aba56454da1c..e6870988e0aa5add872a00f24991595ba7c896c2 100644 (file)
@@ -1,5 +1,5 @@
 /* mprotect with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 6ef5a4a46823a7d63f40a2f3fefa122895f56046..e8e5bc2d598b3c94daf5ea90881195e7ee464c1f 100644 (file)
@@ -1,5 +1,5 @@
 /* munmap with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 7f033a03a7aad1791e1bb80fed6494cdff3f41cc..3d888e8862a91b6992062dd7aa98e8107653018b 100644 (file)
@@ -1,5 +1,5 @@
 /* open64 with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 89a64a55c1ec96ef24fc7a0e14b6b037e9ca25a1..b8529df62085513b3118ffd5b8b5619aa96c9628 100644 (file)
@@ -1,5 +1,5 @@
 /* pipe with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index bec2521ffc44ca14d28f6ec4f5ed8c2e9c5a8c69..b24bf32fc5544136ba0dcce7780970f6be7dd7f3 100644 (file)
@@ -1,5 +1,5 @@
 /* poll with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 664c809e9fc2ff4b6b115682d27b30a6141c1a12..52aa2602fe07cee49e7a7fcc9cfae8b70449e90d 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_attr_destroy with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 2e30ade9abd59596a00588c03e946bce9c7b220f..c7aa903db2cb1605bb15ed2d3e912d0b698907ca 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_attr_init with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index b544dbaa429628c073eb1c0d27119494a3887a77..6e845acc97d4a63923abf0051a5ea445e45671b8 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_attr_setdetachstate with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 35fed5d9ec62421d49599e3896f1423254d4b369..964ec058c9f5832040da5d8caf8d33b7c4ce61b2 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_attr_setguardsize with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 02d06310a9cc86c67db6766d89488cc8ce354201..c5517c0c6646f3290e56330fbe957dee9bf7c80d 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_attr_setstacksize with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index efc0719a6397ec4e366704aeec1868ca14b6c957..1dae148b465bf31440977369828547bebfcae828 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_barrier_destroy with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index b32dad1315e62d339f6b7f8b37481290d839043a..4a2975ad1247b8a0369e6dc927ef9abb8fa77899 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_barrier_init with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 7cee44d0a328806563f94a0f31b663027600d53e..61690c5e7c90e2654037401acbe0a56441e9bf41 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_barrier_wait with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 3af16f9b5433d5489cff5fe1ed72d249295dc8f2..26e864ea3e8c4241f1c3d1ecfa8bec7d18098db9 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_cancel with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 3094d82e9cbbc9dc507887f21ae4b67e13799d3b..1658db4b62a18039142c699ff32cc468bd556762 100644 (file)
@@ -1,5 +1,5 @@
 /* Return value checking for pthread functions, exit variant.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index b0e9b2a2327366b013f7646f3998c292c85c2fe2..08ec683b6600767f6039531a7ff2326629286892 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_cond_wait with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 98c63e54c369e10bd8c1c680c2002d36ef245dce..24b8456db9f45f8e946ef0010408b7f4cab98ab2 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_create with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 2088af2f575de637ecc76f7681f573913bc05580..c65f2d7db11dc44fba81abae98e9e6aba64a38bb 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_detach with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index f23bb9a5aea9e1a8e37b9ce8caff889a57ee80e4..29acbd283a17f9d6b5bedb561eabf4d1180eed79 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_join with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 52364be365da41afbef4fd14ef4911bb4f8ffeb0..d337163609aa877a91bc1e17ec112aa607bbccd1 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_mutex_consistent with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index f11f8f0acd00f2d3ef0d7c62bf3e5ea6bf979c42..d03f016629eb2e652641d2ee67b4c8b12a8da51c 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_mutex_destroy with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 2d16d1b9d9429c0fde19c0178c1619921809bbee..40855954a8e38336536ecb29ba0ba9f6fd1f8841 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_mutex_init with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index af727b45f354299aad2649ddb0f087074b698bce..4257960aaaf279ce6acfeeaf25c2525e311f7e5e 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_mutex_lock with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 161b41edf6def0801af20f9e446542e864844a82..5c385c69340e9c5eee12ef23d761c6754635692e 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_mutex_unlock with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index c699e32b410724edab603cacc849021fe64fdb6c..f352a7ad933365bc141c12f4771ad0b377585f91 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_mutexattr_destroy with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index fa93fab178eb17cb31b5ccfc13bd029a6231d08f..fe231581e300cdee8d2c507adcb74da495d48a7e 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_mutexattr_init with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 353f75e3d778ee8e5e219f910514487c47ffe9ca..e2f544d38ccf56286327fbb4889931cd7ad353cd 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_mutexattr_setprotocol with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 242da1aeca8e9a476aec7bd79427bbb8cb7a3734..2380560d796f272ffe1e3289e60a3e1632dad34d 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_mutexattr_setpshared with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index d7d6fa86301ab9d06f0c48571417f5acd5a095e1..7886c72a77b4b41bcdeb5e8b3180f24d9af72a48 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_mutexattr_setrobust with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index cf22170b56e2cbda4acc353fa8873469d731d5cc..91f790c9e52e71d48679ce0454fdf9c08f5bda34 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_mutexattr_settype with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 70d58dbab2ac60e4d253cc03ffaf4e6fa682fff5..b22c1ce3dd87f24a9a19f14aaee9f70909beff01 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_once with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 824288c90eb64f2fe74111e5df3c59fccc9804c3..e6c38115d872f02a18b78ed00ca4cde1194a9189 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_rwlock_init with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 96330a5637df2103c39c89bcb6c0f373bbb9dde7..a88068fc86f9e2a37ba504230b2760f845c2f640 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_rwlock_rdlock with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index eaa136b3ec13e8315bfbb8d642c6310efc0c72b9..7eb282fd182e2a1124282b05e0621ed854f9abf9 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_rwlock_unlock with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 8d25d5b818aea5bb6d809a39725b588d4330617b..0de37146c393cf371bb4ef81a7cfc4bf1635b486 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_rwlock_wrlock with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 48baf247f3e6922251c355ee24ffecfd2e0e40de..96ac47d777aedf1846a5ba56b25aa61e26d05b35 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_rwlockattr_init with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 958aace9f68d49d50793e062dcf16fde41532c18..34aa3df0a952903cf9dbf91e3c6fb2f9de2771f7 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_rwlockattr_setkind_np with error checking.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 0ba9ca02dc6aab53fb4d6b3320ea40d8125bd7f7..1fb91dcc209b35b4f51ad27aad1991411070849f 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_sigmask with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 6975215b171f82584b8a3af506d7b179454332cc..4cadbf70f9f4149828732eff0f08fc5efe1e5119 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_spin_lock with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 4f19a44c48bdfd0ebcf05692ba05a2da4593a48b..194613993af454322f9eadb0abf90ac386d7735f 100644 (file)
@@ -1,5 +1,5 @@
 /* pthread_spin_unlock with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 9126c6c3ea515dd57888e1663ea843c01c970f93..1901e741eb0755e687613fd9db82bf3401ef624a 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrapper for raise.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index aec58a2aa61432fe46fc7c4070469b23f2ba8952..c6386491dbc1bafd076aa2dadcddd3d67f03405e 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking, allocating wrapper for readlink.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 00c313880c1ba08cd32e57c2b25705eaa3d46fc8..4d9987c9bb50952de13b964aafb35feeed5dd636 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrapper for realloc.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 17809c4dd2c64113252ee43acbce269e1a33fb81..a1011a5062819f8fc5fc696821a735adfcc4169e 100644 (file)
@@ -1,5 +1,5 @@
 /* recvfrom with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 20bddf696511ab879e31688f85debcc5402bc884..f51530793ec2e2b25eedfb078b2289f9ecff1eb1 100644 (file)
@@ -1,5 +1,5 @@
 /* sendto with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 9931882e759343273d01562de5ebacd271f9e64e..b7c07f21f99f407a003c00b4832d7cccafc4d57d 100644 (file)
@@ -1,5 +1,5 @@
 /* setsockopt with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index b74c69afaee067fcd964ca24836337bc83f3be90..51657de2b73c763177ffd8e12450e35b89a29a3b 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrapper for sigaction.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 22a1dd74a7cd02802afdebe53900defbbbb744d2..e7369f0324bac4647a708eeddf3c3785cc261038 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrapper for signal.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 3087ed0082fafb993324413beac79dae0b8b3936..9ab8d1bfddf6c59831bf59e479d2f80bac86a580 100644 (file)
@@ -1,5 +1,5 @@
 /* Support functionality for using signals.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index c1deaee9248fb2c4e248f900e5da36022bbcab8c..20282fb810085139dcd0921f8db2c1c8d460c9b2 100644 (file)
@@ -1,5 +1,5 @@
 /* socket with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index d6724948d8a1f58a4c61c95162bc005d744ee722..9673abdf54bb57762771d4e15bf4a0080afb13da 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrappers for socket functions.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index bcc2e863bfc397ca697e1be9fcd54ff4d705dd4d..e7d0274474706380bbb027e814cbdef39b175f5d 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrappers for stdio functions.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index d6a8c04baf04bcd005a9939206abac6764d385b6..89eee8584e989208ba4f9c33862b97c1557c3832 100644 (file)
@@ -1,5 +1,5 @@
 /* strdup with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index d59a283d25afb537ca0f0df17326bb157359c74e..e85fddd439cb273d426bdfafad57aa5b1d8df6c4 100644 (file)
@@ -1,5 +1,5 @@
 /* strndup with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 15ab1e26c4569c844cf32ab83dee50682e3a50aa..afefc2d09842afda1a972cdeb31461675076fcfc 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrapper for sysconf.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 472763ebe86cfef5e60738b24b915a0188ca4337..79358e7c99c946c4eda620e705b82974d0fd8bc7 100644 (file)
@@ -1,5 +1,5 @@
 /* Support functionality for using threads.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 29da063c15e6d5dd3b12597a40dbf926ab72151e..5fe5dae818def4ec66a91e8c02d6cd8ed5c2aecd 100644 (file)
@@ -1,5 +1,5 @@
 /* POSIX-specific extra functions.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index f94ee118cfd81c8a87bf635963a761a5fa9dba80..2ff9296fca8f2848eed97fe8af48c05287328a72 100644 (file)
@@ -1,5 +1,5 @@
 /* Error-checking wrapper for unlink.
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 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
index 204795e4c0d86088c3201d31b3fa48bbc9255f49..1cb039ca177bc81d8317aa9049828170b874181b 100644 (file)
@@ -1,5 +1,5 @@
 /* waitpid with error checking.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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
index 134e8ee4c11563558a2cb458c597eb4ed53b45d1..bbaae9130a3f0229481d95f717972b24d4bb89f4 100644 (file)
@@ -1,5 +1,5 @@
 /* write with error checking and retries.
-   Copyright (C) 2016-2017 Free Software Foundation, Inc.
+   Copyright (C) 2016-2018 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