aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-09-30 11:42:05 +0000
committerNick Clifton <nickc@redhat.com>2005-09-30 11:42:05 +0000
commita70c240376fbfde088944325cc58a0e9edba6cc5 (patch)
tree7a7fc819d79f97c05d8089d9f8a4032877677c4c /ld
parent7fe2b9a6a674d57789207d7f14fb2f0573bcc8f5 (diff)
downloadgdb-a70c240376fbfde088944325cc58a0e9edba6cc5.zip
gdb-a70c240376fbfde088944325cc58a0e9edba6cc5.tar.gz
gdb-a70c240376fbfde088944325cc58a0e9edba6cc5.tar.bz2
asintl.h/bucomm.h/ld.h: Prevent the inclusion of <libintl.h> from the Solaris
version of <locale.h> when ENABLE_NLS is not defined. gprof.c (main):Only invoke bindtextdomain() and textdomain() if ENABLE_NLS is defined.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog5
-rw-r--r--ld/ld.h36
2 files changed, 41 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 85fc35a..5b47fea 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-30 Matthias Kurz <mk@baerlap.north.de>
+
+ * ld.h: Prevent the inclusion of <libintl.h> from the Solaris
+ version of <locale.h> when ENABLE_NLS is not defined.
+
2005-09-27 H.J. Lu <hongjiu.lu@intel.com>
* ld.texinfo (ALIGN): Document it as forcing output section
diff --git a/ld/ld.h b/ld/ld.h
index 9ada8be..e1aa62c 100644
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -24,6 +24,42 @@
#define LD_H
#ifdef HAVE_LOCALE_H
+#endif
+#ifndef SEEK_CUR
+#define SEEK_CUR 1
+#endif
+#ifndef SEEK_END
+#define SEEK_END 2
+#endif
+
+#if defined(__GNUC__) && !defined(C_ALLOCA)
+# undef alloca
+# define alloca __builtin_alloca
+#else
+# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
+# include <alloca.h>
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+# if !defined (__STDC__) && !defined (__hpux)
+char *alloca ();
+# else
+void *alloca ();
+# endif /* __STDC__, __hpux */
+# endif /* alloca */
+# endif /* HAVE_ALLOCA_H */
+#endif
+
+
+#ifdef HAVE_LOCALE_H
+# ifndef ENABLE_NLS
+ /* The Solaris version of locale.h always includes libintl.h. If we have
+ been configured with --disable-nls then ENABLE_NLS will not be defined
+ and the dummy definitions of bindtextdomain (et al) below will conflict
+ with the defintions in libintl.h. So we define these values to prevent
+ the bogus inclusion of libintl.h. */
+# define _LIBINTL_H
+# define _LIBGETTEXT_H
+# endif
# include <locale.h>
#endif