fix libgfortran export prefixes

Richard Henderson rth@redhat.com
Mon Dec 13 02:52:00 GMT 2004


This patch fixes all the exported symbols in libgfortran so that
they begin with "_gfortran_", rather than a mismash where some
began with just "__".

Note that there are still quite a lot of gfc_resolve_* routines
that don't reference PREFIX.  Some of these are supposed to be
redundant with builtin functions and other intrinsic resolvers.
I was going to see about cleaning these up some other way than
just blindly renaming things; after all, there's no implementation
for them in the library.

Tested on alphaev67-linux.

Committed based on general approval of the idea from Paul and
Steven on irc.


r~


gcc/fortran/
        * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count,
        gfc_resolve_cshift, gfc_resolve_dot_product, gfc_resolve_eoshift,
        gfc_resolve_matmul, gfc_resolve_maxloc, gfc_resolve_maxval,
        gfc_resolve_minloc, gfc_resolve_minval, gfc_resolve_pack,
        gfc_resolve_product, gfc_resolve_reshape, gfc_resolve_shape,
        gfc_resolve_spread, gfc_resolve_sum, gfc_resolve_transpose,
        gfc_resolve_unpack: Use PREFIX.
libgfortran/
        * intrinsics/cshift0.c, intrinsics/eoshift0.c, intrinsics/eoshift2.c,
        intrinsics/pack_generic.c, intrinsics/reshape_generic.c,
        intrinsics/spread_generic.c, intrinsics/transpose_generic.c,
        intrinsics/unpack_generic.c, m4/cshift1.m4, m4/dotprod.m4,
        m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4,
        m4/iforeach.m4, m4/ifunction.m4, m4/matmul.m4, m4/matmull.m4,
        m4/reshape.m4, m4/shape.m4, m4/transpose.m4: Use standard prefix
        instead of "__".
        * generated/*: Rebuild.

Index: gcc/fortran/iresolve.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/fortran/iresolve.c,v
retrieving revision 1.26
diff -c -p -d -u -r1.26 iresolve.c
--- gcc/fortran/iresolve.c	12 Dec 2004 21:09:09 -0000	1.26
+++ gcc/fortran/iresolve.c	13 Dec 2004 02:39:14 -0000
@@ -126,7 +126,6 @@ free_strings (void)
 void
 gfc_resolve_abs (gfc_expr * f, gfc_expr * a)
 {
-
   f->ts = a->ts;
   if (f->ts.type == BT_COMPLEX)
     f->ts.type = BT_REAL;
@@ -139,7 +138,6 @@ gfc_resolve_abs (gfc_expr * f, gfc_expr 
 void
 gfc_resolve_acos (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__acos_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -149,7 +147,6 @@ gfc_resolve_acos (gfc_expr * f, gfc_expr
 void
 gfc_resolve_aimag (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts.type = BT_REAL;
   f->ts.kind = x->ts.kind;
   f->value.function.name =
@@ -160,7 +157,6 @@ gfc_resolve_aimag (gfc_expr * f, gfc_exp
 void
 gfc_resolve_aint (gfc_expr * f, gfc_expr * a, gfc_expr * kind)
 {
-
   f->ts.type = a->ts.type;
   f->ts.kind = (kind == NULL) ? a->ts.kind : mpz_get_si (kind->value.integer);
 
@@ -181,7 +177,6 @@ gfc_resolve_dint (gfc_expr * f, gfc_expr
 void
 gfc_resolve_all (gfc_expr * f, gfc_expr * mask, gfc_expr * dim)
 {
-
   f->ts = mask->ts;
 
   if (dim != NULL)
@@ -192,7 +187,7 @@ gfc_resolve_all (gfc_expr * f, gfc_expr 
     }
 
   f->value.function.name =
-    gfc_get_string ("__all_%c%d", gfc_type_letter (mask->ts.type),
+    gfc_get_string (PREFIX("all_%c%d"), gfc_type_letter (mask->ts.type),
 		    mask->ts.kind);
 }
 
@@ -200,7 +195,6 @@ gfc_resolve_all (gfc_expr * f, gfc_expr 
 void
 gfc_resolve_anint (gfc_expr * f, gfc_expr * a, gfc_expr * kind)
 {
-
   f->ts.type = a->ts.type;
   f->ts.kind = (kind == NULL) ? a->ts.kind : mpz_get_si (kind->value.integer);
 
@@ -221,7 +215,6 @@ gfc_resolve_dnint (gfc_expr * f, gfc_exp
 void
 gfc_resolve_any (gfc_expr * f, gfc_expr * mask, gfc_expr * dim)
 {
-
   f->ts = mask->ts;
 
   if (dim != NULL)
@@ -232,7 +225,7 @@ gfc_resolve_any (gfc_expr * f, gfc_expr 
     }
 
   f->value.function.name =
-    gfc_get_string ("__any_%c%d", gfc_type_letter (mask->ts.type),
+    gfc_get_string (PREFIX("any_%c%d"), gfc_type_letter (mask->ts.type),
 		    mask->ts.kind);
 }
 
@@ -240,7 +233,6 @@ gfc_resolve_any (gfc_expr * f, gfc_expr 
 void
 gfc_resolve_asin (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__asin_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -250,7 +242,6 @@ gfc_resolve_asin (gfc_expr * f, gfc_expr
 void
 gfc_resolve_atan (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__atan_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -261,7 +252,6 @@ void
 gfc_resolve_atan2 (gfc_expr * f, gfc_expr * x,
 		   gfc_expr * y ATTRIBUTE_UNUSED)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__atan2_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -289,7 +279,6 @@ gfc_resolve_besn (gfc_expr * f, gfc_expr
 void
 gfc_resolve_btest (gfc_expr * f, gfc_expr * i, gfc_expr * pos)
 {
-
   f->ts.type = BT_LOGICAL;
   f->ts.kind = gfc_default_logical_kind;
 
@@ -301,7 +290,6 @@ gfc_resolve_btest (gfc_expr * f, gfc_exp
 void
 gfc_resolve_ceiling (gfc_expr * f, gfc_expr * a, gfc_expr * kind)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = (kind == NULL) ? gfc_default_integer_kind
     : mpz_get_si (kind->value.integer);
@@ -315,7 +303,6 @@ gfc_resolve_ceiling (gfc_expr * f, gfc_e
 void
 gfc_resolve_char (gfc_expr * f, gfc_expr * a, gfc_expr * kind)
 {
-
   f->ts.type = BT_CHARACTER;
   f->ts.kind = (kind == NULL) ? gfc_default_character_kind
     : mpz_get_si (kind->value.integer);
@@ -329,7 +316,6 @@ gfc_resolve_char (gfc_expr * f, gfc_expr
 void
 gfc_resolve_cmplx (gfc_expr * f, gfc_expr * x, gfc_expr * y, gfc_expr * kind)
 {
-
   f->ts.type = BT_COMPLEX;
   f->ts.kind = (kind == NULL) ? gfc_default_real_kind
     : mpz_get_si (kind->value.integer);
@@ -354,7 +340,6 @@ gfc_resolve_dcmplx (gfc_expr * f, gfc_ex
 void
 gfc_resolve_conjg (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name = gfc_get_string ("__conjg_%d", x->ts.kind);
 }
@@ -363,7 +348,6 @@ gfc_resolve_conjg (gfc_expr * f, gfc_exp
 void
 gfc_resolve_cos (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__cos_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -373,7 +357,6 @@ gfc_resolve_cos (gfc_expr * f, gfc_expr 
 void
 gfc_resolve_cosh (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__cosh_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -383,7 +366,6 @@ gfc_resolve_cosh (gfc_expr * f, gfc_expr
 void
 gfc_resolve_count (gfc_expr * f, gfc_expr * mask, gfc_expr * dim)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = gfc_default_integer_kind;
 
@@ -395,7 +377,7 @@ gfc_resolve_count (gfc_expr * f, gfc_exp
     }
 
   f->value.function.name =
-    gfc_get_string ("__count_%d_%c%d", f->ts.kind,
+    gfc_get_string (PREFIX("count_%d_%c%d"), f->ts.kind,
 		    gfc_type_letter (mask->ts.type), mask->ts.kind);
 }
 
@@ -424,14 +406,13 @@ gfc_resolve_cshift (gfc_expr * f, gfc_ex
 	gfc_convert_type_warn (dim, &shift->ts, 2, 0);
     }
   f->value.function.name =
-    gfc_get_string ("__cshift%d_%d", n, shift->ts.kind);
+    gfc_get_string (PREFIX("cshift%d_%d"), n, shift->ts.kind);
 }
 
 
 void
 gfc_resolve_dble (gfc_expr * f, gfc_expr * a)
 {
-
   f->ts.type = BT_REAL;
   f->ts.kind = gfc_default_double_kind;
   f->value.function.name =
@@ -443,7 +424,6 @@ void
 gfc_resolve_dim (gfc_expr * f, gfc_expr * x,
 		 gfc_expr * y ATTRIBUTE_UNUSED)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__dim_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -472,7 +452,7 @@ gfc_resolve_dot_product (gfc_expr * f, g
     }
 
   f->value.function.name =
-    gfc_get_string ("__dot_product_%c%d", gfc_type_letter (f->ts.type),
+    gfc_get_string (PREFIX("dot_product_%c%d"), gfc_type_letter (f->ts.type),
 		    f->ts.kind);
 }
 
@@ -513,14 +493,13 @@ gfc_resolve_eoshift (gfc_expr * f, gfc_e
     gfc_convert_type_warn (dim, &shift->ts, 2, 0);
 
   f->value.function.name =
-    gfc_get_string ("__eoshift%d_%d", n, shift->ts.kind);
+    gfc_get_string (PREFIX("eoshift%d_%d"), n, shift->ts.kind);
 }
 
 
 void
 gfc_resolve_exp (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__exp_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -530,7 +509,6 @@ gfc_resolve_exp (gfc_expr * f, gfc_expr 
 void
 gfc_resolve_exponent (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = gfc_default_integer_kind;
 
@@ -541,7 +519,6 @@ gfc_resolve_exponent (gfc_expr * f, gfc_
 void
 gfc_resolve_floor (gfc_expr * f, gfc_expr * a, gfc_expr * kind)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = (kind == NULL) ? gfc_default_integer_kind
     : mpz_get_si (kind->value.integer);
@@ -555,7 +532,6 @@ gfc_resolve_floor (gfc_expr * f, gfc_exp
 void
 gfc_resolve_fnum (gfc_expr * f, gfc_expr * n)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = gfc_default_integer_kind;
   if (n->ts.kind != f->ts.kind)
@@ -567,7 +543,6 @@ gfc_resolve_fnum (gfc_expr * f, gfc_expr
 void
 gfc_resolve_fraction (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name = gfc_get_string ("__fraction_%d", x->ts.kind);
 }
@@ -640,7 +615,6 @@ gfc_resolve_iand (gfc_expr * f, gfc_expr
 void
 gfc_resolve_ibclr (gfc_expr * f, gfc_expr * i, gfc_expr * pos ATTRIBUTE_UNUSED)
 {
-
   f->ts = i->ts;
   f->value.function.name = gfc_get_string ("__ibclr_%d", i->ts.kind);
 }
@@ -651,7 +625,6 @@ gfc_resolve_ibits (gfc_expr * f, gfc_exp
 		   gfc_expr * pos ATTRIBUTE_UNUSED,
 		   gfc_expr * len ATTRIBUTE_UNUSED)
 {
-
   f->ts = i->ts;
   f->value.function.name = gfc_get_string ("__ibits_%d", i->ts.kind);
 }
@@ -661,7 +634,6 @@ void
 gfc_resolve_ibset (gfc_expr * f, gfc_expr * i,
 		   gfc_expr * pos ATTRIBUTE_UNUSED)
 {
-
   f->ts = i->ts;
   f->value.function.name = gfc_get_string ("__ibset_%d", i->ts.kind);
 }
@@ -670,7 +642,6 @@ gfc_resolve_ibset (gfc_expr * f, gfc_exp
 void
 gfc_resolve_ichar (gfc_expr * f, gfc_expr * c)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = gfc_default_integer_kind;
 
@@ -726,7 +697,6 @@ gfc_resolve_ior (gfc_expr * f, gfc_expr 
 void
 gfc_resolve_int (gfc_expr * f, gfc_expr * a, gfc_expr * kind)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = (kind == NULL) ? gfc_default_integer_kind
     : mpz_get_si (kind->value.integer);
@@ -740,7 +710,6 @@ gfc_resolve_int (gfc_expr * f, gfc_expr 
 void
 gfc_resolve_ishft (gfc_expr * f, gfc_expr * i, gfc_expr * shift)
 {
-
   f->ts = i->ts;
   f->value.function.name =
     gfc_get_string ("__ishft_%d_%d", i->ts.kind, shift->ts.kind);
@@ -784,7 +753,6 @@ gfc_resolve_lbound (gfc_expr * f, gfc_ex
 void
 gfc_resolve_len (gfc_expr * f, gfc_expr * string)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = gfc_default_integer_kind;
   f->value.function.name = gfc_get_string ("__len_%d", string->ts.kind);
@@ -794,7 +762,6 @@ gfc_resolve_len (gfc_expr * f, gfc_expr 
 void
 gfc_resolve_len_trim (gfc_expr * f, gfc_expr * string)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = gfc_default_integer_kind;
   f->value.function.name = gfc_get_string ("__len_trim%d", string->ts.kind);
@@ -804,7 +771,6 @@ gfc_resolve_len_trim (gfc_expr * f, gfc_
 void
 gfc_resolve_log (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__log_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -814,7 +780,6 @@ gfc_resolve_log (gfc_expr * f, gfc_expr 
 void
 gfc_resolve_log10 (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__log10_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -824,7 +789,6 @@ gfc_resolve_log10 (gfc_expr * f, gfc_exp
 void
 gfc_resolve_logical (gfc_expr * f, gfc_expr * a, gfc_expr * kind)
 {
-
   f->ts.type = BT_LOGICAL;
   f->ts.kind = (kind == NULL) ? gfc_default_logical_kind
     : mpz_get_si (kind->value.integer);
@@ -860,7 +824,7 @@ gfc_resolve_matmul (gfc_expr * f, gfc_ex
   f->rank = (a->rank == 2 && b->rank == 2) ? 2 : 1;
 
   f->value.function.name =
-    gfc_get_string ("__matmul_%c%d", gfc_type_letter (f->ts.type),
+    gfc_get_string (PREFIX("matmul_%c%d"), gfc_type_letter (f->ts.type),
 		    f->ts.kind);
 }
 
@@ -917,7 +881,7 @@ gfc_resolve_maxloc (gfc_expr * f, gfc_ex
 
   name = mask ? "mmaxloc" : "maxloc";
   f->value.function.name =
-    gfc_get_string ("__%s%d_%d_%c%d", name, dim != NULL, f->ts.kind,
+    gfc_get_string (PREFIX("%s%d_%d_%c%d"), name, dim != NULL, f->ts.kind,
                     gfc_type_letter (array->ts.type), array->ts.kind);
 }
 
@@ -926,7 +890,6 @@ void
 gfc_resolve_maxval (gfc_expr * f, gfc_expr * array, gfc_expr * dim,
 		    gfc_expr * mask)
 {
-
   f->ts = array->ts;
 
   if (dim != NULL)
@@ -936,7 +899,7 @@ gfc_resolve_maxval (gfc_expr * f, gfc_ex
     }
 
   f->value.function.name =
-    gfc_get_string ("__%s_%c%d", mask ? "mmaxval" : "maxval",
+    gfc_get_string (PREFIX("%s_%c%d"), mask ? "mmaxval" : "maxval",
 		    gfc_type_letter (array->ts.type), array->ts.kind);
 }
 
@@ -946,7 +909,6 @@ gfc_resolve_merge (gfc_expr * f, gfc_exp
 		   gfc_expr * fsource ATTRIBUTE_UNUSED,
 		   gfc_expr * mask ATTRIBUTE_UNUSED)
 {
-
   f->ts = tsource->ts;
   f->value.function.name =
     gfc_get_string ("__merge_%c%d", gfc_type_letter (tsource->ts.type),
@@ -980,7 +942,7 @@ gfc_resolve_minloc (gfc_expr * f, gfc_ex
 
   name = mask ? "mminloc" : "minloc";
   f->value.function.name =
-    gfc_get_string ("__%s%d_%d_%c%d", name, dim != NULL, f->ts.kind,
+    gfc_get_string (PREFIX("%s%d_%d_%c%d"), name, dim != NULL, f->ts.kind,
                     gfc_type_letter (array->ts.type), array->ts.kind);
 }
 
@@ -989,7 +951,6 @@ void
 gfc_resolve_minval (gfc_expr * f, gfc_expr * array, gfc_expr * dim,
 		    gfc_expr * mask)
 {
-
   f->ts = array->ts;
 
   if (dim != NULL)
@@ -999,7 +960,7 @@ gfc_resolve_minval (gfc_expr * f, gfc_ex
     }
 
   f->value.function.name =
-    gfc_get_string ("__%s_%c%d", mask ? "mminval" : "minval",
+    gfc_get_string (PREFIX("%s_%c%d"), mask ? "mminval" : "minval",
 		    gfc_type_letter (array->ts.type), array->ts.kind);
 }
 
@@ -1008,7 +969,6 @@ void
 gfc_resolve_mod (gfc_expr * f, gfc_expr * a,
 		 gfc_expr * p ATTRIBUTE_UNUSED)
 {
-
   f->ts = a->ts;
   f->value.function.name =
     gfc_get_string ("__mod_%c%d", gfc_type_letter (a->ts.type), a->ts.kind);
@@ -1019,7 +979,6 @@ void
 gfc_resolve_modulo (gfc_expr * f, gfc_expr * a,
 		    gfc_expr * p ATTRIBUTE_UNUSED)
 {
-
   f->ts = a->ts;
   f->value.function.name =
     gfc_get_string ("__modulo_%c%d", gfc_type_letter (a->ts.type),
@@ -1027,10 +986,8 @@ gfc_resolve_modulo (gfc_expr * f, gfc_ex
 }
 
 void
-gfc_resolve_nearest (gfc_expr * f, gfc_expr * a,
-             gfc_expr *p ATTRIBUTE_UNUSED)
+gfc_resolve_nearest (gfc_expr * f, gfc_expr * a, gfc_expr *p ATTRIBUTE_UNUSED)
 {
-
   f->ts = a->ts;
   f->value.function.name =
     gfc_get_string ("__nearest_%c%d", gfc_type_letter (a->ts.type),
@@ -1040,7 +997,6 @@ gfc_resolve_nearest (gfc_expr * f, gfc_e
 void
 gfc_resolve_nint (gfc_expr * f, gfc_expr * a, gfc_expr * kind)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = (kind == NULL) ? gfc_default_integer_kind
     : mpz_get_si (kind->value.integer);
@@ -1053,7 +1009,6 @@ gfc_resolve_nint (gfc_expr * f, gfc_expr
 void
 gfc_resolve_not (gfc_expr * f, gfc_expr * i)
 {
-
   f->ts = i->ts;
   f->value.function.name = gfc_get_string ("__not_%d", i->ts.kind);
 }
@@ -1065,14 +1020,11 @@ gfc_resolve_pack (gfc_expr * f,
 		  gfc_expr * mask,
 		  gfc_expr * vector ATTRIBUTE_UNUSED)
 {
-  static char pack[] = "__pack",
-    pack_s[] = "__pack_s";
-
   f->ts = array->ts;
   f->rank = 1;
 
   if (mask->rank != 0)
-    f->value.function.name = pack;
+    f->value.function.name = PREFIX("pack");
   else
     {
       /* We convert mask to default logical only in the scalar case.
@@ -1087,7 +1039,7 @@ gfc_resolve_pack (gfc_expr * f,
 	  gfc_convert_type (mask, &ts, 2);
 	}
 
-      f->value.function.name = pack_s;
+      f->value.function.name = PREFIX("pack_s");
     }
 }
 
@@ -1096,7 +1048,6 @@ void
 gfc_resolve_product (gfc_expr * f, gfc_expr * array, gfc_expr * dim,
 		     gfc_expr * mask)
 {
-
   f->ts = array->ts;
 
   if (dim != NULL)
@@ -1106,7 +1057,7 @@ gfc_resolve_product (gfc_expr * f, gfc_e
     }
 
   f->value.function.name =
-    gfc_get_string ("__%s_%c%d", mask ? "mproduct" : "product",
+    gfc_get_string (PREFIX("%s_%c%d"), mask ? "mproduct" : "product",
 		    gfc_type_letter (array->ts.type), array->ts.kind);
 }
 
@@ -1114,7 +1065,6 @@ gfc_resolve_product (gfc_expr * f, gfc_e
 void
 gfc_resolve_real (gfc_expr * f, gfc_expr * a, gfc_expr * kind)
 {
-
   f->ts.type = BT_REAL;
 
   if (kind != NULL)
@@ -1131,9 +1081,8 @@ gfc_resolve_real (gfc_expr * f, gfc_expr
 
 void
 gfc_resolve_repeat (gfc_expr * f, gfc_expr * string,
-		   gfc_expr * ncopies ATTRIBUTE_UNUSED)
+		    gfc_expr * ncopies ATTRIBUTE_UNUSED)
 {
-
   f->ts.type = BT_CHARACTER;
   f->ts.kind = string->ts.kind;
   f->value.function.name = gfc_get_string ("__repeat_%d", string->ts.kind);
@@ -1145,7 +1094,6 @@ gfc_resolve_reshape (gfc_expr * f, gfc_e
 		     gfc_expr * pad ATTRIBUTE_UNUSED,
 		     gfc_expr * order ATTRIBUTE_UNUSED)
 {
-  static char reshape0[] = "__reshape";
   mpz_t rank;
   int kind;
   int i;
@@ -1178,11 +1126,11 @@ gfc_resolve_reshape (gfc_expr * f, gfc_e
     case 8:
     /* case 16: */
       f->value.function.name =
-	gfc_get_string ("__reshape_%d", source->ts.kind);
+	gfc_get_string (PREFIX("reshape_%d"), source->ts.kind);
       break;
 
     default:
-      f->value.function.name = reshape0;
+      f->value.function.name = PREFIX("reshape");
       break;
     }
 
@@ -1217,7 +1165,6 @@ gfc_resolve_reshape (gfc_expr * f, gfc_e
 void
 gfc_resolve_rrspacing (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name = gfc_get_string ("__rrspacing_%d", x->ts.kind);
 }
@@ -1226,7 +1173,6 @@ gfc_resolve_rrspacing (gfc_expr * f, gfc
 void
 gfc_resolve_scale (gfc_expr * f, gfc_expr * x, gfc_expr * i)
 {
-
   f->ts = x->ts;
 
   /* The implementation calls scalbn which takes an int as the
@@ -1250,7 +1196,6 @@ gfc_resolve_scan (gfc_expr * f, gfc_expr
 		  gfc_expr * set ATTRIBUTE_UNUSED,
 		  gfc_expr * back ATTRIBUTE_UNUSED)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = gfc_default_integer_kind;
   f->value.function.name = gfc_get_string ("__scan_%d", string->ts.kind);
@@ -1260,7 +1205,6 @@ gfc_resolve_scan (gfc_expr * f, gfc_expr
 void
 gfc_resolve_set_exponent (gfc_expr * f, gfc_expr * x, gfc_expr * i)
 {
-
   f->ts = x->ts;
 
   /* The library implementation uses GFC_INTEGER_4 unconditionally,
@@ -1283,11 +1227,10 @@ gfc_resolve_set_exponent (gfc_expr * f, 
 void
 gfc_resolve_shape (gfc_expr * f, gfc_expr * array)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = gfc_default_integer_kind;
   f->rank = 1;
-  f->value.function.name = gfc_get_string ("__shape_%d", f->ts.kind);
+  f->value.function.name = gfc_get_string (PREFIX("shape_%d"), f->ts.kind);
   f->shape = gfc_get_shape (1);
   mpz_init_set_ui (f->shape[0], array->rank);
 }
@@ -1296,7 +1239,6 @@ gfc_resolve_shape (gfc_expr * f, gfc_exp
 void
 gfc_resolve_sign (gfc_expr * f, gfc_expr * a, gfc_expr * b ATTRIBUTE_UNUSED)
 {
-
   f->ts = a->ts;
   f->value.function.name =
     gfc_get_string ("__sign_%c%d", gfc_type_letter (a->ts.type), a->ts.kind);
@@ -1306,7 +1248,6 @@ gfc_resolve_sign (gfc_expr * f, gfc_expr
 void
 gfc_resolve_sin (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__sin_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -1316,7 +1257,6 @@ gfc_resolve_sin (gfc_expr * f, gfc_expr 
 void
 gfc_resolve_sinh (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__sinh_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -1326,7 +1266,6 @@ gfc_resolve_sinh (gfc_expr * f, gfc_expr
 void
 gfc_resolve_spacing (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name = gfc_get_string ("__spacing_%d", x->ts.kind);
 }
@@ -1337,11 +1276,9 @@ gfc_resolve_spread (gfc_expr * f, gfc_ex
 		    gfc_expr * dim,
 		    gfc_expr * ncopies)
 {
-  static char spread[] = "__spread";
-
   f->ts = source->ts;
   f->rank = source->rank + 1;
-  f->value.function.name = spread;
+  f->value.function.name = PREFIX("spread");
 
   gfc_resolve_index (dim, 1);
   gfc_resolve_index (ncopies, 1);
@@ -1351,7 +1288,6 @@ gfc_resolve_spread (gfc_expr * f, gfc_ex
 void
 gfc_resolve_sqrt (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__sqrt_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -1364,7 +1300,6 @@ void
 gfc_resolve_stat (gfc_expr * f, gfc_expr * n ATTRIBUTE_UNUSED,
 		  gfc_expr * a ATTRIBUTE_UNUSED)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = gfc_default_integer_kind;
   f->value.function.name = gfc_get_string (PREFIX("stat_i%d"), f->ts.kind);
@@ -1374,7 +1309,6 @@ gfc_resolve_stat (gfc_expr * f, gfc_expr
 void
 gfc_resolve_fstat (gfc_expr * f, gfc_expr * n, gfc_expr * a ATTRIBUTE_UNUSED)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = gfc_default_integer_kind;
   if (n->ts.kind != f->ts.kind)
@@ -1388,7 +1322,6 @@ void
 gfc_resolve_sum (gfc_expr * f, gfc_expr * array, gfc_expr * dim,
 		 gfc_expr * mask)
 {
-
   f->ts = array->ts;
 
   if (dim != NULL)
@@ -1398,7 +1331,7 @@ gfc_resolve_sum (gfc_expr * f, gfc_expr 
     }
 
   f->value.function.name =
-    gfc_get_string ("__%s_%c%d", mask ? "msum" : "sum",
+    gfc_get_string (PREFIX("%s_%c%d"), mask ? "msum" : "sum",
 		    gfc_type_letter (array->ts.type), array->ts.kind);
 }
 
@@ -1417,7 +1350,6 @@ gfc_resolve_system (gfc_expr * f, gfc_ex
 void
 gfc_resolve_tan (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__tan_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -1427,7 +1359,6 @@ gfc_resolve_tan (gfc_expr * f, gfc_expr 
 void
 gfc_resolve_tanh (gfc_expr * f, gfc_expr * x)
 {
-
   f->ts = x->ts;
   f->value.function.name =
     gfc_get_string ("__tanh_%c%d", gfc_type_letter (x->ts.type), x->ts.kind);
@@ -1459,7 +1390,6 @@ gfc_resolve_transfer (gfc_expr * f, gfc_
 void
 gfc_resolve_transpose (gfc_expr * f, gfc_expr * matrix)
 {
-  static char transpose0[] = "__transpose";
   int kind;
 
   f->ts = matrix->ts;
@@ -1495,11 +1425,11 @@ gfc_resolve_transpose (gfc_expr * f, gfc
     case 8:
     /* case 16: */
       f->value.function.name =
-        gfc_get_string ("__transpose_%d", kind);
+        gfc_get_string (PREFIX("transpose_%d"), kind);
       break;
 
     default:
-      f->value.function.name = transpose0;
+      f->value.function.name = PREFIX("transpose");
     }
 }
 
@@ -1507,7 +1437,6 @@ gfc_resolve_transpose (gfc_expr * f, gfc
 void
 gfc_resolve_trim (gfc_expr * f, gfc_expr * string)
 {
-
   f->ts.type = BT_CHARACTER;
   f->ts.kind = string->ts.kind;
   f->value.function.name = gfc_get_string ("__trim_%d", string->ts.kind);
@@ -1539,7 +1468,6 @@ gfc_resolve_ubound (gfc_expr * f, gfc_ex
 void
 gfc_resolve_umask (gfc_expr * f, gfc_expr * n)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = n->ts.kind;
   f->value.function.name = gfc_get_string (PREFIX("umask_i%d"), n->ts.kind);
@@ -1551,7 +1479,6 @@ gfc_resolve_umask (gfc_expr * f, gfc_exp
 void
 gfc_resolve_unlink (gfc_expr * f, gfc_expr * n ATTRIBUTE_UNUSED)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = 4;
   f->value.function.name = gfc_get_string (PREFIX("unlink"));
@@ -1561,13 +1488,12 @@ void
 gfc_resolve_unpack (gfc_expr * f, gfc_expr * vector, gfc_expr * mask,
 		    gfc_expr * field ATTRIBUTE_UNUSED)
 {
-
   f->ts.type = vector->ts.type;
   f->ts.kind = vector->ts.kind;
   f->rank = mask->rank;
 
   f->value.function.name =
-    gfc_get_string ("__unpack%d", field->rank > 0 ? 1 : 0);
+    gfc_get_string (PREFIX("unpack%d"), field->rank > 0 ? 1 : 0);
 }
 
 
@@ -1576,7 +1502,6 @@ gfc_resolve_verify (gfc_expr * f, gfc_ex
 		    gfc_expr * set ATTRIBUTE_UNUSED,
 		    gfc_expr * back ATTRIBUTE_UNUSED)
 {
-
   f->ts.type = BT_INTEGER;
   f->ts.kind = gfc_default_integer_kind;
   f->value.function.name = gfc_get_string ("__verify_%d", string->ts.kind);
@@ -1875,6 +1800,5 @@ gfc_iresolve_init_1 (void)
 void
 gfc_iresolve_done_1 (void)
 {
-
   free_strings ();
 }
Index: libgfortran/intrinsics/cshift0.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/cshift0.c,v
retrieving revision 1.6
diff -c -p -d -u -r1.6 cshift0.c
--- libgfortran/intrinsics/cshift0.c	12 Dec 2004 08:59:04 -0000	1.6
+++ libgfortran/intrinsics/cshift0.c	13 Dec 2004 02:39:14 -0000
@@ -66,8 +66,8 @@ DEF_COPY_LOOP(ldouble, long double)
 
 
 static void
-__cshift0 (gfc_array_char * ret, const gfc_array_char * array,
-	   ssize_t shift, int which)
+cshift0 (gfc_array_char * ret, const gfc_array_char * array,
+	 ssize_t shift, int which)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -238,24 +238,24 @@ __cshift0 (gfc_array_char * ret, const g
 }
 
 
-extern void __cshift0_4 (gfc_array_char *, const gfc_array_char *,
-			 const GFC_INTEGER_4 *, const GFC_INTEGER_4 *);
-export_proto_np(__cshift0_4);
+extern void cshift0_4 (gfc_array_char *, const gfc_array_char *,
+		       const GFC_INTEGER_4 *, const GFC_INTEGER_4 *);
+export_proto(cshift0_4);
 
 void
-__cshift0_4 (gfc_array_char * ret, const gfc_array_char * array,
-    const GFC_INTEGER_4 * pshift, const GFC_INTEGER_4 * pdim)
+cshift0_4 (gfc_array_char *ret, const gfc_array_char *array,
+	   const GFC_INTEGER_4 *pshift, const GFC_INTEGER_4 *pdim)
 {
-  __cshift0 (ret, array, *pshift, pdim ? *pdim : 1);
+  cshift0 (ret, array, *pshift, pdim ? *pdim : 1);
 }
 
-extern void __cshift0_8 (gfc_array_char *, const gfc_array_char *,
-			 const GFC_INTEGER_8 *, const GFC_INTEGER_8 *);
-export_proto_np(__cshift0_8);
+extern void cshift0_8 (gfc_array_char *, const gfc_array_char *,
+		       const GFC_INTEGER_8 *, const GFC_INTEGER_8 *);
+export_proto(cshift0_8);
 
 void
-__cshift0_8 (gfc_array_char * ret, const gfc_array_char * array,
-    const GFC_INTEGER_8 * pshift, const GFC_INTEGER_8 * pdim)
+cshift0_8 (gfc_array_char *ret, const gfc_array_char *array,
+	   const GFC_INTEGER_8 *pshift, const GFC_INTEGER_8 *pdim)
 {
-  __cshift0 (ret, array, *pshift, pdim ? *pdim : 1);
+  cshift0 (ret, array, *pshift, pdim ? *pdim : 1);
 }
Index: libgfortran/intrinsics/eoshift0.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/eoshift0.c,v
retrieving revision 1.6
diff -c -p -d -u -r1.6 eoshift0.c
--- libgfortran/intrinsics/eoshift0.c	12 Dec 2004 08:59:04 -0000	1.6
+++ libgfortran/intrinsics/eoshift0.c	13 Dec 2004 02:39:14 -0000
@@ -32,8 +32,8 @@ static const char zeros[16] =
    sizeof(int) < sizeof (index_type).  */
 
 static void
-__eoshift0 (gfc_array_char * ret, const gfc_array_char * array,
-    int shift, const char * pbound, int which)
+eoshift0 (gfc_array_char * ret, const gfc_array_char * array,
+	  int shift, const char * pbound, int which)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -187,28 +187,28 @@ __eoshift0 (gfc_array_char * ret, const 
     }
 }
 
-extern void __eoshift0_4 (gfc_array_char *, const gfc_array_char *,
-			  const GFC_INTEGER_4 *, const char *,
-			  const GFC_INTEGER_4 *);
-export_proto_np(__eoshift0_4);
+extern void eoshift0_4 (gfc_array_char *, const gfc_array_char *,
+			const GFC_INTEGER_4 *, const char *,
+			const GFC_INTEGER_4 *);
+export_proto(eoshift0_4);
 
 void
-__eoshift0_4 (gfc_array_char * ret, const gfc_array_char * array,
-    const GFC_INTEGER_4 * pshift, const char * pbound,
-    const GFC_INTEGER_4 * pdim)
+eoshift0_4 (gfc_array_char *ret, const gfc_array_char *array,
+	    const GFC_INTEGER_4 *pshift, const char *pbound,
+	    const GFC_INTEGER_4 *pdim)
 {
-  __eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1);
+  eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1);
 }
 
-extern void __eoshift0_8 (gfc_array_char *, const gfc_array_char *,
-			  const GFC_INTEGER_8 *, const char *,
-			  const GFC_INTEGER_8 *);
-export_proto_np(__eoshift0_8);
+extern void eoshift0_8 (gfc_array_char *, const gfc_array_char *,
+			const GFC_INTEGER_8 *, const char *,
+			const GFC_INTEGER_8 *);
+export_proto(eoshift0_8);
 
 void
-__eoshift0_8 (gfc_array_char * ret, const gfc_array_char * array,
-    const GFC_INTEGER_8 * pshift, const char * pbound,
-    const GFC_INTEGER_8 * pdim)
+eoshift0_8 (gfc_array_char *ret, const gfc_array_char *array,
+	    const GFC_INTEGER_8 *pshift, const char *pbound,
+	    const GFC_INTEGER_8 *pdim)
 {
-  __eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1);
+  eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1);
 }
Index: libgfortran/intrinsics/eoshift2.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/eoshift2.c,v
retrieving revision 1.6
diff -c -p -d -u -r1.6 eoshift2.c
--- libgfortran/intrinsics/eoshift2.c	12 Dec 2004 08:59:04 -0000	1.6
+++ libgfortran/intrinsics/eoshift2.c	13 Dec 2004 02:39:14 -0000
@@ -32,8 +32,8 @@ static const char zeros[16] =
    sizeof(int) < sizeof (index_type).  */
 
 static void
-__eoshift2 (gfc_array_char * ret, const gfc_array_char * array,
-    int shift, const gfc_array_char * bound, int which)
+eoshift2 (gfc_array_char *ret, const gfc_array_char *array,
+	  int shift, const gfc_array_char *bound, int which)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
@@ -203,28 +203,28 @@ __eoshift2 (gfc_array_char * ret, const 
     }
 }
 
-extern void __eoshift2_4 (gfc_array_char *, const gfc_array_char *,
-			  const GFC_INTEGER_4 *, const gfc_array_char *,
-			  const GFC_INTEGER_4 *);
-export_proto_np(__eoshift2_4);
+extern void eoshift2_4 (gfc_array_char *, const gfc_array_char *,
+			const GFC_INTEGER_4 *, const gfc_array_char *,
+			const GFC_INTEGER_4 *);
+export_proto(eoshift2_4);
 
 void
-__eoshift2_4 (gfc_array_char * ret, const gfc_array_char * array,
-    const GFC_INTEGER_4 * pshift, const gfc_array_char * bound,
-    const GFC_INTEGER_4 * pdim)
+eoshift2_4 (gfc_array_char *ret, const gfc_array_char *array,
+	    const GFC_INTEGER_4 *pshift, const gfc_array_char *bound,
+	    const GFC_INTEGER_4 *pdim)
 {
-  __eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1);
+  eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1);
 }
 
-extern void __eoshift2_8 (gfc_array_char *, const gfc_array_char *,
-			  const GFC_INTEGER_8 *, const gfc_array_char *,
-			  const GFC_INTEGER_8 *);
-export_proto_np(__eoshift2_8);
+extern void eoshift2_8 (gfc_array_char *, const gfc_array_char *,
+			const GFC_INTEGER_8 *, const gfc_array_char *,
+			const GFC_INTEGER_8 *);
+export_proto(eoshift2_8);
 
 void
-__eoshift2_8 (gfc_array_char * ret, const gfc_array_char * array,
-    const GFC_INTEGER_8 * pshift, const gfc_array_char * bound,
-    const GFC_INTEGER_8 * pdim)
+eoshift2_8 (gfc_array_char *ret, const gfc_array_char *array,
+	    const GFC_INTEGER_8 *pshift, const gfc_array_char *bound,
+	    const GFC_INTEGER_8 *pdim)
 {
-  __eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1);
+  eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1);
 }
Index: libgfortran/intrinsics/pack_generic.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/pack_generic.c,v
retrieving revision 1.6
diff -c -p -d -u -r1.6 pack_generic.c
--- libgfortran/intrinsics/pack_generic.c	12 Dec 2004 08:59:04 -0000	1.6
+++ libgfortran/intrinsics/pack_generic.c	13 Dec 2004 02:39:14 -0000
@@ -65,13 +65,13 @@ Boston, MA 02111-1307, USA.  */
 There are two variants of the PACK intrinsic: one, where MASK is
 array valued, and the other one where MASK is scalar.  */
 
-extern void __pack (gfc_array_char *, const gfc_array_char *,
-		    const gfc_array_l4 *, const gfc_array_char *);
-export_proto_np(__pack);
+extern void pack (gfc_array_char *, const gfc_array_char *,
+		  const gfc_array_l4 *, const gfc_array_char *);
+export_proto(pack);
 
 void
-__pack (gfc_array_char * ret, const gfc_array_char * array,
-	const gfc_array_l4 * mask, const gfc_array_char * vector)
+pack (gfc_array_char *ret, const gfc_array_char *array,
+      const gfc_array_l4 *mask, const gfc_array_char *vector)
 {
   /* r.* indicates the return array.  */
   index_type rstride0;
@@ -269,13 +269,13 @@ __pack (gfc_array_char * ret, const gfc_
     }
 }
 
-extern void __pack_s (gfc_array_char *ret, const gfc_array_char *array,
-		      const GFC_LOGICAL_4 *, const gfc_array_char *);
-export_proto_np(__pack_s);
+extern void pack_s (gfc_array_char *ret, const gfc_array_char *array,
+		    const GFC_LOGICAL_4 *, const gfc_array_char *);
+export_proto(pack_s);
 
 void
-__pack_s (gfc_array_char * ret, const gfc_array_char * array,
-	  const GFC_LOGICAL_4 * mask, const gfc_array_char * vector)
+pack_s (gfc_array_char *ret, const gfc_array_char *array,
+	const GFC_LOGICAL_4 *mask, const gfc_array_char *vector)
 {
   /* r.* indicates the return array.  */
   index_type rstride0;
Index: libgfortran/intrinsics/reshape_generic.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/reshape_generic.c,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 reshape_generic.c
--- libgfortran/intrinsics/reshape_generic.c	12 Dec 2004 08:59:04 -0000	1.4
+++ libgfortran/intrinsics/reshape_generic.c	13 Dec 2004 02:39:14 -0000
@@ -28,16 +28,15 @@ Boston, MA 02111-1307, USA.  */
 typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) parray;
 
-extern void __reshape (parray *, parray *, shape_type *,
-		       parray *, shape_type *);
-export_proto_np(__reshape);
+extern void reshape (parray *, parray *, shape_type *, parray *, shape_type *);
+export_proto(reshape);
 
 /* The shape parameter is ignored. We can currently deduce the shape from the
    return array.  */
 
 void
-__reshape (parray * ret, parray * source, shape_type * shape,
-           parray * pad, shape_type * order)
+reshape (parray *ret, parray *source, shape_type *shape,
+	 parray *pad, shape_type *order)
 {
   /* r.* indicates the return array.  */
   index_type rcount[GFC_MAX_DIMENSIONS - 1];
Index: libgfortran/intrinsics/spread_generic.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/spread_generic.c,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 spread_generic.c
--- libgfortran/intrinsics/spread_generic.c	12 Dec 2004 08:59:04 -0000	1.4
+++ libgfortran/intrinsics/spread_generic.c	13 Dec 2004 02:39:14 -0000
@@ -1,4 +1,4 @@
-/* Generic implementation of the RESHAPE intrinsic
+/* Generic implementation of the SPREAD intrinsic
    Copyright 2002 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
 
@@ -25,13 +25,13 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #include "libgfortran.h"
 
-extern void __spread (const gfc_array_char *, const gfc_array_char *,
-		      const index_type *, const index_type *);
-export_proto_np(__spread);
+extern void spread (const gfc_array_char *, const gfc_array_char *,
+		    const index_type *, const index_type *);
+export_proto(spread);
 
 void
-__spread (const gfc_array_char * ret, const gfc_array_char * source,
-    const index_type * along, const index_type * pncopies)
+spread (const gfc_array_char *ret, const gfc_array_char *source,
+	const index_type *along, const index_type *pncopies)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
Index: libgfortran/intrinsics/transpose_generic.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/transpose_generic.c,v
retrieving revision 1.6
diff -c -p -d -u -r1.6 transpose_generic.c
--- libgfortran/intrinsics/transpose_generic.c	12 Dec 2004 08:59:04 -0000	1.6
+++ libgfortran/intrinsics/transpose_generic.c	13 Dec 2004 02:39:14 -0000
@@ -25,11 +25,11 @@ Boston, MA 02111-1307, USA.  */
 #include <assert.h>
 #include "libgfortran.h"
 
-extern void __transpose (gfc_array_char *, gfc_array_char *);
-export_proto_np(__transpose);
+extern void transpose (gfc_array_char *, gfc_array_char *);
+export_proto(transpose);
 
 void
-__transpose (gfc_array_char * ret, gfc_array_char * source)
+transpose (gfc_array_char *ret, gfc_array_char *source)
 {
   /* r.* indicates the return array.  */
   index_type rxstride, rystride;
Index: libgfortran/intrinsics/unpack_generic.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/unpack_generic.c,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 unpack_generic.c
--- libgfortran/intrinsics/unpack_generic.c	12 Dec 2004 08:59:04 -0000	1.4
+++ libgfortran/intrinsics/unpack_generic.c	13 Dec 2004 02:39:14 -0000
@@ -25,13 +25,13 @@ Boston, MA 02111-1307, USA.  */
 #include <string.h>
 #include "libgfortran.h"
 
-extern void __unpack1 (const gfc_array_char *, const gfc_array_char *,
-		       const gfc_array_l4 *, const gfc_array_char *);
-export_proto_np(__unpack1);
+extern void unpack1 (const gfc_array_char *, const gfc_array_char *,
+		     const gfc_array_l4 *, const gfc_array_char *);
+iexport_proto(unpack1);
 
 void
-__unpack1 (const gfc_array_char * ret, const gfc_array_char * vector,
-    const gfc_array_l4 * mask, const gfc_array_char * field)
+unpack1 (const gfc_array_char *ret, const gfc_array_char *vector,
+	 const gfc_array_l4 *mask, const gfc_array_char *field)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS];
@@ -143,18 +143,19 @@ __unpack1 (const gfc_array_char * ret, c
         }
     }
 }
+iexport(unpack1);
 
-extern void __unpack0 (const gfc_array_char *, const gfc_array_char *,
-		       const gfc_array_l4 *, char *);
-export_proto_np(__unpack0);
+extern void unpack0 (const gfc_array_char *, const gfc_array_char *,
+		     const gfc_array_l4 *, char *);
+export_proto(unpack0);
 
 void
-__unpack0 (const gfc_array_char * ret, const gfc_array_char * vector,
-    const gfc_array_l4 * mask, char * field)
+unpack0 (const gfc_array_char *ret, const gfc_array_char *vector,
+	 const gfc_array_l4 *mask, char *field)
 {
   gfc_array_char tmp;
 
   tmp.dtype = 0;
   tmp.data = field;
-  __unpack1 (ret, vector, mask, &tmp);
+  unpack1 (ret, vector, mask, &tmp);
 }
Index: libgfortran/m4/cshift1.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/cshift1.m4,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 cshift1.m4
--- libgfortran/m4/cshift1.m4	12 Dec 2004 08:59:05 -0000	1.4
+++ libgfortran/m4/cshift1.m4	13 Dec 2004 02:39:14 -0000
@@ -26,15 +26,15 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"'
 include(iparm.m4)dnl
 
-void __cshift1_`'atype_kind (const gfc_array_char * ret,
-			     const gfc_array_char * array,
-			     const atype * h, const atype_name * pwhich);
-export_proto_np(__cshift1_`'atype_kind);
+void cshift1_`'atype_kind (const gfc_array_char * ret,
+			   const gfc_array_char * array,
+			   const atype * h, const atype_name * pwhich);
+export_proto(cshift1_`'atype_kind);
 
 void
-__cshift1_`'atype_kind (const gfc_array_char * ret,
-			const gfc_array_char * array,
-			const atype * h, const atype_name * pwhich)
+cshift1_`'atype_kind (const gfc_array_char * ret,
+		      const gfc_array_char * array,
+		      const atype * h, const atype_name * pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
Index: libgfortran/m4/dotprod.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/dotprod.m4,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 dotprod.m4
--- libgfortran/m4/dotprod.m4	12 Dec 2004 08:59:05 -0000	1.4
+++ libgfortran/m4/dotprod.m4	13 Dec 2004 02:39:14 -0000
@@ -27,12 +27,12 @@ include(iparm.m4)dnl
 
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array;
 
-extern rtype_name __dot_product_`'rtype_code (rtype * a, rtype * b);
-export_proto_np(__dot_product_`'rtype_code);
+extern rtype_name dot_product_`'rtype_code (rtype * a, rtype * b);
+export_proto(dot_product_`'rtype_code);
 
 /* Both parameters will already have been converted to the result type.  */
 rtype_name
-__dot_product_`'rtype_code (rtype * a, rtype * b)
+dot_product_`'rtype_code (rtype * a, rtype * b)
 {
   rtype_name *pa;
   rtype_name *pb;
Index: libgfortran/m4/dotprodc.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/dotprodc.m4,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 dotprodc.m4
--- libgfortran/m4/dotprodc.m4	12 Dec 2004 08:59:05 -0000	1.4
+++ libgfortran/m4/dotprodc.m4	13 Dec 2004 02:39:14 -0000
@@ -28,12 +28,12 @@ include(iparm.m4)dnl
 
 typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array;
 
-extern rtype_name __dot_product_`'rtype_code (rtype * a, rtype * b);
-export_proto_np(__dot_product_`'rtype_code);
+extern rtype_name dot_product_`'rtype_code (rtype * a, rtype * b);
+export_proto(dot_product_`'rtype_code);
 
 /* Both parameters will already have been converted to the result type.  */
 rtype_name
-__dot_product_`'rtype_code (rtype * a, rtype * b)
+dot_product_`'rtype_code (rtype * a, rtype * b)
 {
   rtype_name *pa;
   rtype_name *pb;
Index: libgfortran/m4/dotprodl.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/dotprodl.m4,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 dotprodl.m4
--- libgfortran/m4/dotprodl.m4	12 Dec 2004 08:59:05 -0000	1.4
+++ libgfortran/m4/dotprodl.m4	13 Dec 2004 02:39:14 -0000
@@ -25,11 +25,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"'
 include(iparm.m4)dnl
 
-extern rtype_name __dot_product_`'rtype_code (gfc_array_l4 *, gfc_array_l4 *);
-export_proto_np(__dot_product_`'rtype_code);
+extern rtype_name dot_product_`'rtype_code (gfc_array_l4 *, gfc_array_l4 *);
+export_proto(dot_product_`'rtype_code);
 
 rtype_name
-__dot_product_`'rtype_code (gfc_array_l4 * a, gfc_array_l4 * b)
+dot_product_`'rtype_code (gfc_array_l4 * a, gfc_array_l4 * b)
 {
   GFC_LOGICAL_4 *pa;
   GFC_LOGICAL_4 *pb;
Index: libgfortran/m4/eoshift1.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/eoshift1.m4,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 eoshift1.m4
--- libgfortran/m4/eoshift1.m4	12 Dec 2004 08:59:05 -0000	1.4
+++ libgfortran/m4/eoshift1.m4	13 Dec 2004 02:39:14 -0000
@@ -29,17 +29,17 @@ include(iparm.m4)dnl
 static const char zeros[16] =
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
-extern void __eoshift1_`'atype_kind (const gfc_array_char *,
+extern void eoshift1_`'atype_kind (const gfc_array_char *,
 				     const gfc_array_char *,
 				     const atype *, const char *,
 				     const atype_name *);
-export_proto_np(__eoshift1_`'atype_kind);
+export_proto(eoshift1_`'atype_kind);
 
 void
-__eoshift1_`'atype_kind (const gfc_array_char *ret,
-			 const gfc_array_char *array,
-			 const atype *h, const char *pbound,
-			 const atype_name *pwhich)
+eoshift1_`'atype_kind (const gfc_array_char *ret,
+		       const gfc_array_char *array,
+		       const atype *h, const char *pbound,
+		       const atype_name *pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
Index: libgfortran/m4/eoshift3.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/eoshift3.m4,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 eoshift3.m4
--- libgfortran/m4/eoshift3.m4	12 Dec 2004 08:59:05 -0000	1.4
+++ libgfortran/m4/eoshift3.m4	13 Dec 2004 02:39:14 -0000
@@ -29,15 +29,15 @@ include(iparm.m4)dnl
 static const char zeros[16] =
   {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
-extern void __eoshift3_`'atype_kind (gfc_array_char *, gfc_array_char *,
+extern void eoshift3_`'atype_kind (gfc_array_char *, gfc_array_char *,
 				     atype *, const gfc_array_char *,
 				     atype_name *);
-export_proto_np(__eoshift3_`'atype_kind);
+export_proto(eoshift3_`'atype_kind);
 
 void
-__eoshift3_`'atype_kind (gfc_array_char *ret, gfc_array_char *array,
-			 atype *h, const gfc_array_char *bound,
-			 atype_name *pwhich)
+eoshift3_`'atype_kind (gfc_array_char *ret, gfc_array_char *array,
+		       atype *h, const gfc_array_char *bound,
+		       atype_name *pwhich)
 {
   /* r.* indicates the return array.  */
   index_type rstride[GFC_MAX_DIMENSIONS - 1];
Index: libgfortran/m4/iforeach.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/iforeach.m4,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 iforeach.m4
--- libgfortran/m4/iforeach.m4	12 Dec 2004 08:59:05 -0000	1.4
+++ libgfortran/m4/iforeach.m4	13 Dec 2004 02:39:14 -0000
@@ -4,11 +4,11 @@ dnl This file is part of the GNU Fortran
 dnl Distributed under the GNU LGPL.  See COPYING for details.
 define(START_FOREACH_FUNCTION,
 `
-extern void `__'name`'rtype_qual`_'atype_code (rtype * retarray, atype *array);
-export_proto_np(`__'name`'rtype_qual`_'atype_code);
+extern void name`'rtype_qual`_'atype_code (rtype * retarray, atype *array);
+export_proto(name`'rtype_qual`_'atype_code);
 
 void
-`__'name`'rtype_qual`_'atype_code (rtype * retarray, atype *array)
+name`'rtype_qual`_'atype_code (rtype * retarray, atype *array)
 {
   index_type count[GFC_MAX_DIMENSIONS];
   index_type extent[GFC_MAX_DIMENSIONS];
@@ -90,11 +90,12 @@ define(FINISH_FOREACH_FUNCTION,
 }')dnl
 define(START_MASKED_FOREACH_FUNCTION,
 `
-extern void `__m'name`'rtype_qual`_'atype_code (rtype *, atype *, gfc_array_l4 *);
-export_proto_np(`__m'name`'rtype_qual`_'atype_code);
+extern void `m'name`'rtype_qual`_'atype_code (rtype *, atype *, gfc_array_l4 *);
+export_proto(`m'name`'rtype_qual`_'atype_code);
 
 void
-`__m'name`'rtype_qual`_'atype_code (rtype * retarray, atype *array, gfc_array_l4 * mask)
+`m'name`'rtype_qual`_'atype_code (rtype * retarray, atype *array,
+				  gfc_array_l4 * mask)
 {
   index_type count[GFC_MAX_DIMENSIONS];
   index_type extent[GFC_MAX_DIMENSIONS];
Index: libgfortran/m4/ifunction.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/ifunction.m4,v
retrieving revision 1.6
diff -c -p -d -u -r1.6 ifunction.m4
--- libgfortran/m4/ifunction.m4	12 Dec 2004 08:59:05 -0000	1.6
+++ libgfortran/m4/ifunction.m4	13 Dec 2004 02:39:14 -0000
@@ -19,11 +19,11 @@ dnl You should not return or break from 
 dnl Care should also be taken to avoid using the names defined in iparm.m4
 define(START_ARRAY_FUNCTION,
 `
-extern void `__'name`'rtype_qual`_'atype_code (rtype *, atype *, index_type *);
-export_proto_np(`__'name`'rtype_qual`_'atype_code);
+extern void name`'rtype_qual`_'atype_code (rtype *, atype *, index_type *);
+export_proto(name`'rtype_qual`_'atype_code);
 
 void
-`__'name`'rtype_qual`_'atype_code (rtype *retarray, atype *array, index_type *pdim)
+name`'rtype_qual`_'atype_code (rtype *retarray, atype *array, index_type *pdim)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
@@ -143,12 +143,13 @@ define(FINISH_ARRAY_FUNCTION,
 }')dnl
 define(START_MASKED_ARRAY_FUNCTION,
 `
-extern void `__m'name`'rtype_qual`_'atype_code (rtype *, atype *, index_type *,
-						gfc_array_l4 *);
-export_proto_np(`__m'name`'rtype_qual`_'atype_code);
+extern void `m'name`'rtype_qual`_'atype_code (rtype *, atype *, index_type *,
+					       gfc_array_l4 *);
+export_proto(`m'name`'rtype_qual`_'atype_code);
 
 void
-`__m'name`'rtype_qual`_'atype_code (rtype * retarray, atype * array, index_type *pdim, gfc_array_l4 * mask)
+`m'name`'rtype_qual`_'atype_code (rtype * retarray, atype * array,
+				  index_type *pdim, gfc_array_l4 * mask)
 {
   index_type count[GFC_MAX_DIMENSIONS - 1];
   index_type extent[GFC_MAX_DIMENSIONS - 1];
Index: libgfortran/m4/matmul.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/matmul.m4,v
retrieving revision 1.7
diff -c -p -d -u -r1.7 matmul.m4
--- libgfortran/m4/matmul.m4	12 Dec 2004 08:59:05 -0000	1.7
+++ libgfortran/m4/matmul.m4	13 Dec 2004 02:39:14 -0000
@@ -38,11 +38,11 @@ include(iparm.m4)dnl
          C(I,J) = C(I,J)+A(I,K)*B(K,J)
 */
 
-extern void `__matmul_'rtype_code (rtype * retarray, rtype * a, rtype * b);
-export_proto_np(`__matmul_'rtype_code);
+extern void matmul_`'rtype_code (rtype * retarray, rtype * a, rtype * b);
+export_proto(matmul_`'rtype_code);
 
 void
-`__matmul_'rtype_code (rtype * retarray, rtype * a, rtype * b)
+matmul_`'rtype_code (rtype * retarray, rtype * a, rtype * b)
 {
   rtype_name *abase;
   rtype_name *bbase;
Index: libgfortran/m4/matmull.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/matmull.m4,v
retrieving revision 1.6
diff -c -p -d -u -r1.6 matmull.m4
--- libgfortran/m4/matmull.m4	12 Dec 2004 08:59:05 -0000	1.6
+++ libgfortran/m4/matmull.m4	13 Dec 2004 02:39:14 -0000
@@ -28,11 +28,11 @@ include(iparm.m4)dnl
 /* Dimensions: retarray(x,y) a(x, count) b(count,y).
    Either a or b can be rank 1.  In this case x or y is 1.  */
 
-extern void `__matmul_'rtype_code (rtype *, gfc_array_l4 *, gfc_array_l4 *);
-export_proto_np(`__matmul_'rtype_code);
+extern void matmul_`'rtype_code (rtype *, gfc_array_l4 *, gfc_array_l4 *);
+export_proto(matmul_`'rtype_code);
 
 void
-`__matmul_'rtype_code (rtype * retarray, gfc_array_l4 * a, gfc_array_l4 * b)
+matmul_`'rtype_code (rtype * retarray, gfc_array_l4 * a, gfc_array_l4 * b)
 {
   GFC_INTEGER_4 *abase;
   GFC_INTEGER_4 *bbase;
Index: libgfortran/m4/reshape.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/reshape.m4,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 reshape.m4
--- libgfortran/m4/reshape.m4	12 Dec 2004 08:59:05 -0000	1.4
+++ libgfortran/m4/reshape.m4	13 Dec 2004 02:39:14 -0000
@@ -31,12 +31,12 @@ typedef GFC_ARRAY_DESCRIPTOR(1, index_ty
    return array.  */
 dnl Only the kind (ie size) is used to name the function.
 
-extern void `__reshape_'rtype_kind (rtype *, rtype *, shape_type *,
+extern void reshape_`'rtype_kind (rtype *, rtype *, shape_type *,
 				    rtype *, shape_type *);
-extern_proto_np(`__reshape_'rtype_kind);
+export_proto(reshape_`'rtype_kind);
 
 void
-`__reshape_'rtype_kind (rtype * ret, rtype * source, shape_type * shape,
+reshape_`'rtype_kind (rtype * ret, rtype * source, shape_type * shape,
                       rtype * pad, shape_type * order)
 {
   /* r.* indicates the return array.  */
Index: libgfortran/m4/shape.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/shape.m4,v
retrieving revision 1.4
diff -c -p -d -u -r1.4 shape.m4
--- libgfortran/m4/shape.m4	12 Dec 2004 08:59:05 -0000	1.4
+++ libgfortran/m4/shape.m4	13 Dec 2004 02:39:14 -0000
@@ -25,11 +25,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"'
 include(iparm.m4)dnl
 
-extern void `__shape_'rtype_kind (rtype * ret, const rtype * array);
-export_proto_np(`__shape_'rtype_kind);
+extern void shape_`'rtype_kind (rtype * ret, const rtype * array);
+export_proto(shape_`'rtype_kind);
 
 void
-`__shape_'rtype_kind (rtype * ret, const rtype * array)
+shape_`'rtype_kind (rtype * ret, const rtype * array)
 {
   int n;
   index_type stride;
Index: libgfortran/m4/transpose.m4
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/m4/transpose.m4,v
retrieving revision 1.6
diff -c -p -d -u -r1.6 transpose.m4
--- libgfortran/m4/transpose.m4	12 Dec 2004 08:59:05 -0000	1.6
+++ libgfortran/m4/transpose.m4	13 Dec 2004 02:39:14 -0000
@@ -24,11 +24,11 @@ Boston, MA 02111-1307, USA.  */
 #include "libgfortran.h"'
 include(iparm.m4)dnl
 
-extern void `__transpose_'rtype_kind (rtype * ret, rtype * source);
-export_proto_np(`__transpose_'rtype_kind);
+extern void transpose_`'rtype_kind (rtype * ret, rtype * source);
+export_proto(transpose_`'rtype_kind);
 
 void
-`__transpose_'rtype_kind (rtype * ret, rtype * source)
+transpose_`'rtype_kind (rtype * ret, rtype * source)
 {
   /* r.* indicates the return array.  */
   index_type rxstride, rystride;



More information about the Fortran mailing list