This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: Enable wide strings in C++ on IA64 HP-UX

This patch enables wide strings in C++ on IA64 HP-UX by defining
_INCLUDE__STDC_A1_SOURCE when compiling C++ programs.  Additionally, it
links in unix98.o in order to get the correct unix98 behavour from the
HP-UX wide string functions.  PA HP-UX has something similar but it also
supports older unix93 and unix95 semantics.  Since this is being newly
added for IA64 I don't think we need to add support for the older
standards.  Without adding the .o file, we get unix95 behavour on IA64
HP-UX and some regression tests in the C++ library testsuite fail.

Since this is HP-UX specific, I will check this in on ToT tomorrow
unless there are objections.

Steve Ellcey

2006-10-24  Steve Ellcey  <>

	* config/ia64/hpux.h: Define _INCLUDE__STDC_A1_SOURCE in C++.
	Add unix98.o to link line.

Index: gcc/config/ia64/hpux.h
--- gcc/config/ia64/hpux.h	(revision 117992)
+++ gcc/config/ia64/hpux.h	(working copy)
@@ -53,6 +53,7 @@ do {							\
 	    builtin_define("_HPUX_SOURCE");		\
 	    builtin_define("__STDC_EXT__");		\
 	    builtin_define("__STDCPP__");		\
+	    builtin_define("_INCLUDE__STDC_A1_SOURCE");	\
 	  }						\
 	if (TARGET_ILP32)				\
 	  builtin_define("_ILP32");			\
@@ -71,7 +72,9 @@ do {							\
-#define STARTFILE_SPEC "%{!shared:%{static:crt0%O%s}}"
+#define STARTFILE_SPEC "%{!shared:%{static:crt0%O%s} \
+			  %{mlp64:/usr/lib/hpux64/unix98%O%s} \
+			  %{!mlp64:/usr/lib/hpux32/unix98%O%s}}"
 #undef LINK_SPEC
 #define LINK_SPEC \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]