Index: trunk/lib/libqof/qof/qoflog.h
===================================================================
--- trunk/lib/libqof/qof/qoflog.h	(revision 17246)
+++ trunk/lib/libqof/qof/qoflog.h	(working copy)
@@ -165,7 +165,7 @@
 /** Set the default level for QOF-related log paths. **/
 void qof_log_set_default(QofLogLevel log_level);
 
-#define PRETTY_FUNC_NAME qof_log_prettify(__FUNCTION__)
+#define PRETTY_FUNC_NAME qof_log_prettify(G_GNUC_PRETTY_FUNCTION)
 
 /** Log a fatal error */
 #define FATAL(format, args...) do { \
Index: trunk/src/engine/kvp-scm.c
===================================================================
--- trunk/src/engine/kvp-scm.c	(revision 17246)
+++ trunk/src/engine/kvp-scm.c	(working copy)
@@ -32,7 +32,7 @@
         }
         else 
         {
-            return kvp_value_new_double(scm_num2dbl(val, __FUNCTION__));
+            return kvp_value_new_double(scm_num2dbl(val, G_GNUC_PRETTY_FUNCTION));
         }
     }
     else if(gnc_numeric_p(val))
@@ -59,7 +59,7 @@
     }
     else if(SWIG_IsPointerOfType(val, SWIG_TypeQuery("_p_KvpFrame")))
     {
-        #define FUNC_NAME __FUNCTION__
+        #define FUNC_NAME G_GNUC_PRETTY_FUNCTION
         KvpFrame *frame = SWIG_MustGetPtr(val, SWIG_TypeQuery("_p_KvpFrame"),
                                           1, 0);
         #undef FUNC_NAME
Index: trunk/src/engine/engine-helpers.c
===================================================================
--- trunk/src/engine/engine-helpers.c	(revision 17246)
+++ trunk/src/engine/engine-helpers.c	(working copy)
@@ -42,7 +42,7 @@
 #include "qofquery-p.h"
 #include "qofquerycore-p.h"
 
-#define FUNC_NAME __FUNCTION__
+#define FUNC_NAME G_GNUC_PRETTY_FUNCTION
 
 static QofLogModule log_module = GNC_MOD_ENGINE;
 
@@ -106,7 +106,7 @@
   if (gnc_timepair_p (x))
   {
     result.tv_sec = gnc_scm_to_gint64(SCM_CAR(x));
-    result.tv_nsec = scm_num2long(SCM_CDR(x), SCM_ARG1, __FUNCTION__);
+    result.tv_nsec = scm_num2long(SCM_CDR(x), SCM_ARG1, FUNC_NAME);
   }
   return(result);
 }
@@ -203,42 +203,42 @@
 static QofQueryCompare
 gnc_query_scm2compare (SCM how_scm)
 {
-  return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
+  return scm_num2int(how_scm, SCM_ARG1, FUNC_NAME);
 }
 
 /* QofStringMatch */
 static QofStringMatch
 gnc_query_scm2string (SCM how_scm)
 {
-  return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
+  return scm_num2int(how_scm, SCM_ARG1, FUNC_NAME);
 }
 
 /* QofDateMatch */
 static QofDateMatch
 gnc_query_scm2date (SCM how_scm)
 {
-  return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
+  return scm_num2int(how_scm, SCM_ARG1, FUNC_NAME);
 }
 
 /* QofNumericMatch */
 static QofNumericMatch
 gnc_query_scm2numericop (SCM how_scm)
 {
-  return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
+  return scm_num2int(how_scm, SCM_ARG1, FUNC_NAME);
 }
 
 /* QofGuidMatch */
 static QofGuidMatch
 gnc_query_scm2guid (SCM how_scm)
 {
-  return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
+  return scm_num2int(how_scm, SCM_ARG1, FUNC_NAME);
 }
 
 /* QofCharMatch */
 static QofCharMatch
 gnc_query_scm2char (SCM how_scm)
 {
-  return scm_num2int(how_scm, SCM_ARG1, __FUNCTION__);
+  return scm_num2int(how_scm, SCM_ARG1, FUNC_NAME);
 }
 
 static QofGuidMatch
@@ -319,7 +319,7 @@
     scm = SCM_CAR (field_scm);
     field_scm = SCM_CDR (field_scm);
 
-    bit = scm_num2int(scm, SCM_ARG2, __FUNCTION__);
+    bit = scm_num2int(scm, SCM_ARG2, FUNC_NAME);
     field |= bit;
   }
 
@@ -516,7 +516,7 @@
 static KvpValueType
 gnc_scm2KvpValueTypeype (SCM value_type_scm)
 {
-  return scm_num2int(value_type_scm, SCM_ARG1, __FUNCTION__);
+  return scm_num2int(value_type_scm, SCM_ARG1, FUNC_NAME);
 }
 
 static SCM gnc_kvp_frame2scm (KvpFrame *frame);
@@ -653,7 +653,7 @@
       break;
 
     case KVP_TYPE_DOUBLE:
-      value = kvp_value_new_double (scm_num2dbl (val_scm, __FUNCTION__));
+      value = kvp_value_new_double (scm_num2dbl (val_scm, FUNC_NAME));
       break;
 
     case KVP_TYPE_STRING: {
@@ -988,7 +988,7 @@
       qt_scm = SCM_CDR (qt_scm);
       if (!SCM_NUMBERP (scm))
         break;
-      val = scm_num2dbl (scm, __FUNCTION__);
+      val = scm_num2dbl (scm, FUNC_NAME);
 
       pd = qof_query_double_predicate (compare_how, val);
 
@@ -1179,7 +1179,7 @@
         break;
       scm = SCM_CAR (query_term_scm);
       query_term_scm = SCM_CDR (query_term_scm);
-      amount = scm_num2dbl (scm, __FUNCTION__);
+      amount = scm_num2dbl (scm, FUNC_NAME);
 
       val = double_to_gnc_numeric (amount, GNC_DENOM_AUTO, 
                        GNC_HOW_DENOM_SIGFIGS(6) | GNC_HOW_RND_ROUND);
@@ -1573,7 +1573,7 @@
     gnc_query_path_free (p);
     return FALSE;
   }
-  o = scm_num2int (val, SCM_ARG1, __FUNCTION__);
+  o = scm_num2int (val, SCM_ARG1, FUNC_NAME);
 
   /* increasing */
   val = SCM_CAR (sort_scm);
@@ -1813,7 +1813,7 @@
         break;
       }
 
-      max_splits = scm_num2int (value, SCM_ARG1, __FUNCTION__);
+      max_splits = scm_num2int (value, SCM_ARG1, FUNC_NAME);
 
     } else {
       PERR ("Unknown symbol: %s", symbol);
@@ -1925,7 +1925,7 @@
         break;
       }
 
-      max_results = scm_num2int (value, SCM_ARG1, __FUNCTION__);
+      max_results = scm_num2int (value, SCM_ARG1, FUNC_NAME);
 
     } else {
       ok = FALSE;
@@ -2047,7 +2047,7 @@
    */
   for (i = 48; i >=0; i-= 16) {
     bits = scm_ash(magnitude, SCM_MAKINUM(-i));
-    c_bits = scm_num2ulong(scm_logand(bits, bits00to15_mask), SCM_ARG1, __FUNCTION__);
+    c_bits = scm_num2ulong(scm_logand(bits, bits00to15_mask), SCM_ARG1, FUNC_NAME);
     c_result += ((long long)c_bits << i);
     magnitude = scm_difference(magnitude, scm_ash(bits, SCM_MAKINUM(i)));
   }
Index: trunk/src/app-utils/gnc-exp-parser.c
===================================================================
--- trunk/src/app-utils/gnc-exp-parser.c	(revision 17246)
+++ trunk/src/app-utils/gnc-exp-parser.c	(working copy)
@@ -382,7 +382,7 @@
   }
     
   result = g_new0( gnc_numeric, 1 );
-  *result = double_to_gnc_numeric( scm_num2dbl(scmTmp, __FUNCTION__),
+  *result = double_to_gnc_numeric( scm_num2dbl(scmTmp, G_GNUC_PRETTY_FUNCTION),
                                    GNC_DENOM_AUTO,
                                    GNC_DENOM_SIGFIGS(6) | GNC_RND_ROUND );
   /* FIXME: cleanup scmArgs = scm_list, cons'ed cells? */
Index: trunk/src/app-utils/gnc-helpers.c
===================================================================
--- trunk/src/app-utils/gnc-helpers.c	(revision 17246)
+++ trunk/src/app-utils/gnc-helpers.c	(working copy)
@@ -68,11 +68,11 @@
 
   info_scm = SCM_CDR (info_scm);
   info.max_decimal_places = scm_num2int (SCM_CAR (info_scm), SCM_ARG1,
-                                         __FUNCTION__);
+                                         G_GNUC_PRETTY_FUNCTION);
 
   info_scm = SCM_CDR (info_scm);
   info.min_decimal_places = scm_num2int (SCM_CAR (info_scm), SCM_ARG1,
-                                         __FUNCTION__);
+                                         G_GNUC_PRETTY_FUNCTION);
 
   info_scm = SCM_CDR (info_scm);
   info.use_separators = SCM_NFALSEP (SCM_CAR (info_scm));
Index: trunk/src/app-utils/option-util.c
===================================================================
--- trunk/src/app-utils/option-util.c	(revision 17246)
+++ trunk/src/app-utils/option-util.c	(working copy)
@@ -821,7 +821,7 @@
 
   if(SCM_EXACTP(value))
   {
-    return scm_num2int(value, SCM_ARG1, __FUNCTION__);
+    return scm_num2int(value, SCM_ARG1, G_GNUC_PRETTY_FUNCTION);
   }
   else
   {
@@ -850,7 +850,7 @@
   }
   else
   {
-    return scm_num2int(value, SCM_ARG1, __FUNCTION__);
+    return scm_num2int(value, SCM_ARG1, G_GNUC_PRETTY_FUNCTION);
   }
 }
 
@@ -1032,7 +1032,7 @@
     if (SCM_FALSEP (scm_integer_p (item))) {
       PERR ("Invalid type");
     } else {
-      type = scm_num2long (item, SCM_ARG1, __FUNCTION__);
+      type = scm_num2long (item, SCM_ARG1, G_GNUC_PRETTY_FUNCTION);
       type_list = g_list_prepend (type_list, GINT_TO_POINTER (type));
     }
   }
@@ -1074,7 +1074,7 @@
     return FALSE;
 
   if (lower_bound != NULL)
-    *lower_bound = scm_num2dbl(value, __FUNCTION__);
+    *lower_bound = scm_num2dbl(value, G_GNUC_PRETTY_FUNCTION);
 
   if (!SCM_LISTP(list) || SCM_NULLP(list))
     return FALSE;
@@ -1087,7 +1087,7 @@
     return FALSE;
 
   if (upper_bound != NULL)
-    *upper_bound = scm_num2dbl(value, __FUNCTION__);
+    *upper_bound = scm_num2dbl(value, G_GNUC_PRETTY_FUNCTION);
 
   if (!SCM_LISTP(list) || SCM_NULLP(list))
     return FALSE;
@@ -1103,7 +1103,7 @@
    * This is still safe for earlier guiles, too -- tested with 1.3.4.
    */
   if (num_decimals != NULL) {
-    double decimals = scm_num2dbl(value, __FUNCTION__);
+    double decimals = scm_num2dbl(value, G_GNUC_PRETTY_FUNCTION);
     *num_decimals = (int)decimals;
   }
 
@@ -1118,7 +1118,7 @@
     return FALSE;
 
   if (step_size != NULL)
-    *step_size = scm_num2dbl(value, __FUNCTION__);
+    *step_size = scm_num2dbl(value, G_GNUC_PRETTY_FUNCTION);
 
   return TRUE;
 }
@@ -1148,7 +1148,7 @@
   if (!SCM_NUMBERP(value))
     return 0.0;
 
-  return scm_num2dbl(value, __FUNCTION__);
+  return scm_num2dbl(value, G_GNUC_PRETTY_FUNCTION);
 }
 
 
@@ -1261,7 +1261,7 @@
 
   scale = 1.0 / scale;
 
-  rgba = scm_num2dbl(SCM_CAR(value), __FUNCTION__);
+  rgba = scm_num2dbl(SCM_CAR(value), G_GNUC_PRETTY_FUNCTION);
   if (red != NULL)
     *red = MIN(1.0, rgba * scale);
 
@@ -1269,7 +1269,7 @@
   if (!SCM_LISTP(value) || SCM_NULLP(value) || !SCM_NUMBERP(SCM_CAR(value)))
     return FALSE;
 
-  rgba = scm_num2dbl(SCM_CAR(value), __FUNCTION__);
+  rgba = scm_num2dbl(SCM_CAR(value), G_GNUC_PRETTY_FUNCTION);
   if (green != NULL)
     *green = MIN(1.0, rgba * scale);
 
@@ -1277,7 +1277,7 @@
   if (!SCM_LISTP(value) || SCM_NULLP(value) || !SCM_NUMBERP(SCM_CAR(value)))
     return FALSE;
 
-  rgba = scm_num2dbl(SCM_CAR(value), __FUNCTION__);
+  rgba = scm_num2dbl(SCM_CAR(value), G_GNUC_PRETTY_FUNCTION);
   if (blue != NULL)
     *blue = MIN(1.0, rgba * scale);
 
@@ -1285,7 +1285,7 @@
   if (!SCM_LISTP(value) || SCM_NULLP(value) || !SCM_NUMBERP(SCM_CAR(value)))
     return FALSE;
 
-  rgba = scm_num2dbl(SCM_CAR(value), __FUNCTION__);
+  rgba = scm_num2dbl(SCM_CAR(value), G_GNUC_PRETTY_FUNCTION);
   if (alpha != NULL)
     *alpha = MIN(1.0, rgba * scale);
 
@@ -2215,7 +2215,7 @@
     {
       value = scm_call_0(getter);
       if (SCM_NUMBERP(value))
-        return scm_num2dbl(value, __FUNCTION__);
+        return scm_num2dbl(value, G_GNUC_PRETTY_FUNCTION);
     }
   }
 
Index: trunk/src/gnome-utils/dialog-options.c
===================================================================
--- trunk/src/gnome-utils/dialog-options.c	(revision 17246)
+++ trunk/src/gnome-utils/dialog-options.c	(working copy)
@@ -53,7 +53,7 @@
 #include "gnc-date-format.h"
 #include "misc-gnome-utils.h"
 
-#define FUNC_NAME __FUNCTION__
+#define FUNC_NAME G_GNUC_PRETTY_FUNCTION
 /* TODO: clean up "register-stocks" junk
  */
 
@@ -2434,7 +2434,7 @@
 
   if (SCM_NUMBERP(value))
   {
-    d_value = scm_num2dbl(value, __FUNCTION__);
+    d_value = scm_num2dbl(value, G_GNUC_PRETTY_FUNCTION);
     gtk_spin_button_set_value(spinner, d_value);
     return FALSE;
   }
Index: trunk/src/report/report-system/gnc-report.c
===================================================================
--- trunk/src/report/report-system/gnc-report.c	(revision 17246)
+++ trunk/src/report/report-system/gnc-report.c	(working copy)
@@ -77,7 +77,7 @@
 
     value = scm_call_1(get_id, report);
     if (SCM_NUMBERP(value)) {
-      id = scm_num2int(value, SCM_ARG1, __FUNCTION__);
+      id = scm_num2int(value, SCM_ARG1, G_GNUC_PRETTY_FUNCTION);
       if (!g_hash_table_lookup(reports, &id)) {
 	key = g_new(gint, 1);
 	*key = id;
Index: trunk/src/report/report-gnome/dialog-column-view.c
===================================================================
--- trunk/src/report/report-gnome/dialog-column-view.c	(revision 17246)
+++ trunk/src/report/report-gnome/dialog-column-view.c	(working copy)
@@ -183,7 +183,7 @@
       if (SCM_EQUALP (SCM_CAR(contents), selection))
         row = i;
 
-      id = scm_num2int(SCM_CAAR(contents), SCM_ARG1, __FUNCTION__);
+      id = scm_num2int(SCM_CAAR(contents), SCM_ARG1, G_GNUC_PRETTY_FUNCTION);
       this_report = gnc_report_find(id);
 
       gtk_list_store_append(store, &iter);
@@ -193,9 +193,9 @@
 							this_report)),
 	 CONTENTS_COL_ROW, i,
 	 CONTENTS_COL_REPORT_COLS, scm_num2int(SCM_CADR(SCM_CAR(contents)),
-					       SCM_ARG1, __FUNCTION__),
+					       SCM_ARG1, G_GNUC_PRETTY_FUNCTION),
 	 CONTENTS_COL_REPORT_ROWS, scm_num2int(SCM_CADDR(SCM_CAR(contents)),
-					       SCM_ARG1, __FUNCTION__),
+					       SCM_ARG1, G_GNUC_PRETTY_FUNCTION),
 	 -1);
     }
   }
@@ -413,7 +413,7 @@
     template_name = scm_list_ref(r->available_list, 
                                 scm_int2num(r->available_selected));
     new_report = scm_call_1(make_report, template_name);
-    id = scm_num2int(new_report, SCM_ARG1, __FUNCTION__);
+    id = scm_num2int(new_report, SCM_ARG1, G_GNUC_PRETTY_FUNCTION);
     scm_call_2(mark_report, gnc_report_find(id), SCM_BOOL_T);
     oldlength = scm_ilength(r->contents_list);
     
@@ -589,10 +589,10 @@
                           scm_int2num(r->contents_selected));
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(colspin),
                               (float)scm_num2int(SCM_CADR(current),
-						 SCM_ARG1, __FUNCTION__));
+						 SCM_ARG1, G_GNUC_PRETTY_FUNCTION));
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(rowspin),
                               (float)scm_num2int(SCM_CADDR(current),
-						 SCM_ARG1, __FUNCTION__));
+						 SCM_ARG1, G_GNUC_PRETTY_FUNCTION));
   
     dlg_ret = gtk_dialog_run(GTK_DIALOG(dlg));
     gtk_widget_hide(dlg);
Index: trunk/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- trunk/src/report/report-gnome/gnc-plugin-page-report.c	(revision 17246)
+++ trunk/src/report/report-gnome/gnc-plugin-page-report.c	(working copy)
@@ -808,7 +808,7 @@
 	  return NULL;
 	}
 
-	report_id = scm_num2int(final_id, SCM_ARG1, __FUNCTION__);
+	report_id = scm_num2int(final_id, SCM_ARG1, G_GNUC_PRETTY_FUNCTION);
 	report = gnc_report_find(report_id);
 	if (!report) {
 	  LEAVE("report doesn't exist");
Index: trunk/src/gnome/gnc-plugin-page-register.c
===================================================================
--- trunk/src/gnome/gnc-plugin-page-register.c	(revision 17246)
+++ trunk/src/gnome/gnc-plugin-page-register.c	(working copy)
@@ -1872,7 +1872,7 @@
   arg = scm_apply (func, args, SCM_EOL);
   g_return_val_if_fail (SCM_EXACTP (arg), -1);
 
-  return scm_num2int (arg, SCM_ARG1, __FUNCTION__);
+  return scm_num2int (arg, SCM_ARG1, G_GNUC_PRETTY_FUNCTION);
 }
 
 /************************************************************/
Index: trunk/src/business/business-core/gncBusGuile.c
===================================================================
--- trunk/src/business/business-core/gncBusGuile.c	(revision 17246)
+++ trunk/src/business/business-core/gncBusGuile.c	(working copy)
@@ -26,7 +26,7 @@
 #include "gncBusGuile.h"
 #include "engine-helpers.h"
 #include "swig-runtime.h"
-#define FUNC_NAME __FUNCTION__
+#define FUNC_NAME G_GNUC_PRETTY_FUNCTION
 
 static swig_type_info *
 get_acct_type ()
Index: trunk/src/business/business-utils/business-options.c
===================================================================
--- trunk/src/business/business-utils/business-options.c	(revision 17246)
+++ trunk/src/business/business-utils/business-options.c	(working copy)
@@ -27,7 +27,7 @@
 #include "business-options.h"
 #include "swig-runtime.h"
 
-#define FUNC_NAME __FUNCTION__
+#define FUNC_NAME G_GNUC_PRETTY_FUNCTION
 
 #define LOOKUP_OPTION(fcn) \
   GNCOption *option; \
Index: trunk/src/business/business-gnome/business-options-gnome.c
===================================================================
--- trunk/src/business/business-gnome/business-options-gnome.c	(revision 17246)
+++ trunk/src/business/business-gnome/business-options-gnome.c	(working copy)
@@ -39,7 +39,7 @@
 #include "business-gnome-utils.h"
 #include "dialog-invoice.h"
 
-#define FUNC_NAME __FUNCTION__
+#define FUNC_NAME G_GNUC_PRETTY_FUNCTION
 
 static GtkWidget *
 create_owner_widget (GNCOption *option, GncOwnerType type, GtkWidget *hbox)
@@ -98,7 +98,7 @@
   SCM odata = gnc_option_get_option_data (option);
 
   /* The option data is enum-typed.  It's just the enum value. */
-  return (GncOwnerType) scm_num2int(odata, SCM_ARG1, __FUNCTION__);
+  return (GncOwnerType) scm_num2int(odata, SCM_ARG1, FUNC_NAME);
 }
 
 
Index: trunk/src/business/business-gnome/dialog-invoice.c
===================================================================
--- trunk/src/business/business-gnome/dialog-invoice.c	(revision 17246)
+++ trunk/src/business/business-gnome/dialog-invoice.c	(working copy)
@@ -587,7 +587,7 @@
 
   arg = scm_apply (func, args, SCM_EOL);
   g_return_if_fail (SCM_EXACTP (arg));
-  report_id = scm_num2int (arg, SCM_ARG1, __FUNCTION__);
+  report_id = scm_num2int (arg, SCM_ARG1, G_GNUC_PRETTY_FUNCTION);
 
   /* scm_gc_unprotect_object(func); */
   if (report_id >= 0)
@@ -789,7 +789,7 @@
   /* Apply the function to the args */
   arg = scm_apply (func, args, SCM_EOL);
   g_return_if_fail (SCM_EXACTP (arg));
-  id = scm_num2int (arg, SCM_ARG1, __FUNCTION__);
+  id = scm_num2int (arg, SCM_ARG1, G_GNUC_PRETTY_FUNCTION);
 
   if (id >= 0)
     reportWindow (id);
