--- gobject/gobject.c	2009-07-13 19:19:16.000000000 +0200
+++ gobject/b/gobject.c	2009-07-13 19:17:22.000000000 +0200
@@ -39,8 +39,6 @@
 #include "gobjectnotifyqueue.c"
 
 
-#define HAVE_TLS
-
 /**
  * SECTION:objects
  * @short_description: The base object type
@@ -188,12 +186,7 @@ static GObjectNotifyContext property_not
 static gulong	            gobject_signals[LAST_SIGNAL] = { 0, };
 static guint (*floating_flag_handler) (GObject*, gint) = object_floating_flag_handler;
 G_LOCK_DEFINE_STATIC (construction_mutex);
-
-#ifndef HAVE_TLS
 static GSList *construction_objects = NULL;
-#else
-static __thread  gboolean in_construction = FALSE;
-#endif /* HAVE_TLS */
 
 /* --- functions --- */
 #ifdef	G_ENABLE_DEBUG
@@ -696,15 +689,10 @@ g_object_init (GObject *object)
   
   /* freeze object's notification queue, g_object_newv() preserves pairedness */
   g_object_notify_queue_freeze (object, &property_notify_context);
-
-#ifdef HAVE_TLS
-  in_construction = TRUE;
-#else
   /* enter construction list for notify_queue_thaw() and to allow construct-only properties */
   G_LOCK (construction_mutex);
   construction_objects = g_slist_prepend (construction_objects, object);
   G_UNLOCK (construction_mutex);
-#endif /* HAVE_TLS */
 
 #ifdef	G_ENABLE_DEBUG
   IF_DEBUG (OBJECTS)
@@ -1075,7 +1063,6 @@ g_object_new (GType	   object_type,
   return object;
 }
 
-#ifndef HAVE_TLS
 static gboolean
 slist_maybe_remove (GSList       **slist,
                     gconstpointer  data)
@@ -1097,17 +1084,14 @@ slist_maybe_remove (GSList       **slist
     }
   return FALSE;
 }
-#endif /* HAVE_TLS */
 
 static inline gboolean
 object_in_construction_list (GObject *object)
 {
-#ifndef HAVE_TLS
   gboolean in_construction;
   G_LOCK (construction_mutex);
   in_construction = g_slist_find (construction_objects, object) != NULL;
   G_UNLOCK (construction_mutex);
-#endif /* HAVE_TLS */
   return in_construction;
 }
 
@@ -1137,10 +1121,8 @@ g_object_newv (GType       object_type,
   guint n_total_cparams = 0, n_cparams = 0, n_oparams = 0, n_cvalues;
   GValue *cvalues;
   GList *clist = NULL;
+  gboolean newly_constructed;
   guint i;
-#ifndef HAVE_TLS
-  gboolean in_construction;
-#endif /* HAVE_TLS */
 
   g_return_val_if_fail (G_TYPE_IS_OBJECT (object_type), NULL);
 
@@ -1238,20 +1220,16 @@ g_object_newv (GType       object_type,
   g_free (cvalues);
 
   /* adjust freeze_count according to g_object_init() and remaining properties */
-
-#ifndef HAVE_TLS
   G_LOCK (construction_mutex);
-  in_construction = slist_maybe_remove (&construction_objects, object);
+  newly_constructed = slist_maybe_remove (&construction_objects, object);
   G_UNLOCK (construction_mutex);
-#endif /* HAVE_TLS */
-
-  if (in_construction || n_oparams)
+  if (newly_constructed || n_oparams)
     nqueue = g_object_notify_queue_freeze (object, &property_notify_context);
-  if (in_construction)
+  if (newly_constructed)
     g_object_notify_queue_thaw (object, nqueue);
 
   /* run 'constructed' handler if there is one */
-  if (in_construction && class->constructed)
+  if (newly_constructed && class->constructed)
     class->constructed (object);
 
   /* set remaining properties */
@@ -1260,13 +1238,9 @@ g_object_newv (GType       object_type,
   g_free (oparams);
 
   /* release our own freeze count and handle notifications */
-  if (in_construction || n_oparams)
+  if (newly_constructed || n_oparams)
     g_object_notify_queue_thaw (object, nqueue);
 
-#ifdef HAVE_TLS
-  in_construction = FALSE;
-#endif /* HAVE_TLS */
-
   if (unref_class)
     g_type_class_unref (unref_class);
 
