summaryrefslogtreecommitdiff
path: root/tests/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/error.c')
-rw-r--r--tests/error.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/error.c b/tests/error.c
index 0ac7695..b3b1286 100644
--- a/tests/error.c
+++ b/tests/error.c
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2007, 2009-2015 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2007, 2009-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@@ -42,6 +42,8 @@
# define USE_UNLOCKED_IO 0
# define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b)
# define _GL_ARG_NONNULL(a)
+#else
+# include "getprogname.h"
#endif
#if USE_UNLOCKED_IO
@@ -113,9 +115,7 @@ int strerror_r ();
# endif
# endif
-/* The calling program should define program_name and set it to the
- name of the executing program. */
-extern char *program_name;
+#define program_name getprogname ()
# if HAVE_STRERROR_R || defined strerror_r
# define __strerror_r strerror_r