[
  [
    "ElectricFence-2.2.2/efence.c.jj", 
    "ElectricFence-2.2.2/efence.c", 
    [
      "--- ElectricFence-2.2.2/efence.c.jj", 
      "+++ ElectricFence-2.2.2/efence.c", 
      "@@ -174,6 +174,15 @@ static int\t\tinternalUse = 0;", 
      "static int\t\tnoAllocationListProtection = 0;", 
      "", 
      "#ifdef USE_SEMAPHORE", 
      "+", 
      "+#include <stdbool.h>", 
      "+", 
      "+#pragma weak sem_init", 
      "+#pragma weak sem_post", 
      "+#pragma weak sem_wait", 
      "+", 
      "+static int\t\tpthread_initialization = 0;", 
      "+", 
      "/*", 
      "* EF_sem is a semaphore used to allow one thread at a time into", 
      "* these routines.", 
      "@@ -274,7 +283,7 @@ initialize(void)", 
      "EF_Print(version);", 
      "", 
      "#ifdef USE_SEMAPHORE", 
      "-\tif (sem_init(&EF_sem, 0, 1) >= 0) {", 
      "+\tif (sem_init != NULL && !pthread_initialization && sem_init(&EF_sem, 0, 1) >= 0) {", 
      "semEnabled = 1;", 
      "}", 
      "#endif", 
      "@@ -397,6 +406,21 @@ initialize(void)", 
      "release();", 
      "}", 
      "", 
      "+#ifdef USE_SEMAPHORE", 
      "+void", 
      "+__libc_malloc_pthread_startup (bool first_time)", 
      "+{", 
      "+\tif (first_time) {", 
      "+\t\tpthread_initialization = 1;", 
      "+\t\tinitialize ();", 
      "+\t} else {", 
      "+\t\tpthread_initialization = 0;", 
      "+\t\tif (!semEnabled && sem_init != NULL && sem_init(&EF_sem, 0, 1) >= 0)", 
      "+\t\t\tsemEnabled = 1;", 
      "+\t}", 
      "+}", 
      "+#endif", 
      "+", 
      "/*", 
      "* allocateMoreSlots is called when there are only enough slot structures", 
      "* left to support the allocation of a single malloc buffer."
    ]
  ], 
  [
    "ElectricFence-2.2.2/Makefile.jj", 
    "ElectricFence-2.2.2/Makefile", 
    [
      "--- ElectricFence-2.2.2/Makefile.jj", 
      "+++ ElectricFence-2.2.2/Makefile", 
      "@@ -1,6 +1,6 @@", 
      "PIC= -fPIC", 
      "CFLAGS= -g -DUSE_SEMAPHORE $(PIC)", 
      "-LIBS= -lpthread", 
      "+LIBS=", 
      "", 
      "prefix=/usr", 
      "BIN_INSTALL_DIR= $(prefix)/bin", 
      "@@ -54,8 +54,8 @@ libefence.a: $(OBJECTS)", 
      "$(AR) crv libefence.a $(OBJECTS)", 
      "", 
      "libefence.so.0.0: $(OBJECTS)", 
      "-\tgcc -g -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \\", 
      "-\t\t$(OBJECTS) -lpthread -lc", 
      "+\tgcc -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \\", 
      "+\t\t$(CFLAGS) $(OBJECTS)", 
      "", 
      "tstheap: libefence.a tstheap.o", 
      "- rm -f tstheap"
    ]
  ]
]