summaryrefslogtreecommitdiff
path: root/gcc/intl/dcgettext.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/intl/dcgettext.c')
-rw-r--r--gcc/intl/dcgettext.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/intl/dcgettext.c b/gcc/intl/dcgettext.c
index c4c7a2c7d14..4399b717d54 100644
--- a/gcc/intl/dcgettext.c
+++ b/gcc/intl/dcgettext.c
@@ -19,6 +19,10 @@
# include <config.h>
#endif
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+# endif
+
#include <sys/types.h>
#ifdef __GNUC__
@@ -58,9 +62,6 @@ void free ();
#endif
#if defined HAVE_STRING_H || defined _LIBC
-# ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-# endif
# include <string.h>
#else
# include <strings.h>
@@ -98,7 +99,7 @@ void free ();
# if !defined HAVE_GETCWD
char *getwd ();
# define getcwd(buf, max) getwd (buf)
-# else
+# elif !defined (HAVE_DECL_GETCWD)
char *getcwd ();
# endif
# ifndef HAVE_STPCPY