diff --git a/ChangeLog b/ChangeLog index eed5cc5f37..d49f22153a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-10-28 Gabriel F. T. Gomes + + * dlfcn/bug-atexit3-lib.cc (write_message): New function, copied + from test-skeleton.c. + (statclass): Replace calls to write with calls to write_message. + 2016-10-28 Joseph Myers * math/math.h diff --git a/dlfcn/bug-atexit3-lib.cc b/dlfcn/bug-atexit3-lib.cc index 3d01ea81d2..aba772004d 100644 --- a/dlfcn/bug-atexit3-lib.cc +++ b/dlfcn/bug-atexit3-lib.cc @@ -1,14 +1,22 @@ #include +#include + +static void +write_message (const char *message) +{ + ssize_t unused __attribute__ ((unused)); + unused = write (STDOUT_FILENO, message, strlen (message)); +} struct statclass { statclass() { - write (1, "statclass\n", 10); + write_message ("statclass\n"); } ~statclass() { - write (1, "~statclass\n", 11); + write_message ("~statclass\n"); } };