--- src.orig/main.c	2004-10-27 08:23:48.000000000 +0900
+++ src/main.c	2004-12-25 17:35:15.696139536 +0900
@@ -3670,13 +3670,9 @@
 	g_free(p);
 
 	if( ! no_extern_c) {
-		out_printf(outh, "#ifdef __cplusplus\n"
-			   "extern \"C\" {\n"
-			   "#endif /* __cplusplus */\n\n");
+		out_printf(outh, "G_BEGIN_DECLS\n");
 		if(outph)
-			out_printf(outph, "#ifdef __cplusplus\n"
-				   "extern \"C\" {\n"
-				   "#endif /* __cplusplus */\n\n");
+			out_printf(outph, "G_BEGIN_DECLS\n");
 	}
 }
 
@@ -3684,15 +3680,11 @@
 print_header_postfixes(void)
 {
 	if( ! no_extern_c)
-		out_printf(outh, "\n#ifdef __cplusplus\n"
-			   "}\n"
-			   "#endif /* __cplusplus */\n");
+		out_printf(outh, "\nG_END_DECLS\n");
 	out_printf(outh, "\n#endif\n");
 	if(outph) {
 		if( ! no_extern_c)
-			out_printf(outph, "\n#ifdef __cplusplus\n"
-				   "}\n"
-				   "#endif /* __cplusplus */\n");
+			out_printf(outph, "\nG_END_DECLS\n");
 		out_printf(outph, "\n#endif\n");
 	}
 }

