Discussion:
Change 28742: [PATCH] g++/x2p (better version)
(too old to reply)
Steve Peters
2006-08-22 01:15:02 UTC
Permalink
Change 28742 by ***@stevep-kirk on 2006/08/22 01:03:05

Subject: [PATCH] g++/x2p (better version)
From: Jarkko Hietaniemi <***@cc.hut.fi>
Date: Mon, 21 Aug 2006 14:48:26 +0300 (EEST)
Message-Id: <***@kosh.hut.fi>

Affected files ...

... //depot/perl/x2p/EXTERN.h#13 edit
... //depot/perl/x2p/INTERN.h#13 edit
... //depot/perl/x2p/hash.h#14 edit

Differences ...

==== //depot/perl/x2p/EXTERN.h#13 (text) ====
Index: perl/x2p/EXTERN.h
--- perl/x2p/EXTERN.h#12~26033~ 2005-11-07 04:26:29.000000000 -0800
+++ perl/x2p/EXTERN.h 2006-08-21 18:03:05.000000000 -0700
@@ -9,6 +9,12 @@
#undef EXT
#define EXT extern

+#ifdef __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C extern
+#endif
+
#undef INIT
#define INIT(x)


==== //depot/perl/x2p/INTERN.h#13 (text) ====
Index: perl/x2p/INTERN.h
--- perl/x2p/INTERN.h#12~26033~ 2005-11-07 04:26:29.000000000 -0800
+++ perl/x2p/INTERN.h 2006-08-21 18:03:05.000000000 -0700
@@ -9,6 +9,12 @@
#undef EXT
#define EXT

+#ifdef __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C
+#endif
+
#undef INIT
#define INIT(x) = x


==== //depot/perl/x2p/hash.h#14 (text) ====
Index: perl/x2p/hash.h
--- perl/x2p/hash.h#13~26033~ 2005-11-07 04:26:29.000000000 -0800
+++ perl/x2p/hash.h 2006-08-21 18:03:05.000000000 -0700
@@ -10,7 +10,7 @@
#define FILLPCT 60 /* don't make greater than 99 */

#ifdef DOINIT
-char const coeff[] = {
+EXTERN_C char const coeff[] = {
61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
@@ -20,7 +20,7 @@
61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1,
61,59,53,47,43,41,37,31,29,23,17,13,11,7,3,1};
#else
-extern const char coeff[];
+EXTERN_C const char coeff[];
#endif

typedef struct hentry HENT;
End of Patch.
John E. Malmberg
2006-08-26 14:35:04 UTC
Permalink
Post by Steve Peters
Subject: [PATCH] g++/x2p (better version)
Now broken on VMS.

EXTERN_C has conflicting macro definitions.

Apparently some header files that define EXTERN_C make sure that it is
#undef if it previously exists, but others do not.

-John
***@qsl.net
Personal Opinion Only

Loading...