Do not use __attribute__((constructor))
[lttv.git] / lttv / lttv / sync / event_matching_tcp.c
index e9cdce925bf66630bd17db015b52e8a2b4dd0a40..5f3aa934e4c87564945b9d874daf554c9c51522c 100644 (file)
@@ -21,6 +21,7 @@
 #endif
 
 #include <errno.h>
+#include <inttypes.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
@@ -42,8 +43,6 @@ static void writeMatchingGraphsPlotsTCPMessages(SyncState* const syncState,
        const unsigned int i, const unsigned int j);
 
 // Functions specific to this module
-static void registerMatchingTCP() __attribute__((constructor (101)));
-
 static void matchEvents(SyncState* const syncState, Event* const event,
        GHashTable* const unMatchedList, GHashTable* const
        unMatchedOppositeList, const size_t fieldOffset, const size_t
@@ -78,7 +77,7 @@ static MatchingModule matchingModuleTCP = {
 /*
  * Matching module registering function
  */
-static void registerMatchingTCP()
+void registerMatchingTCP()
 {
        g_queue_push_tail(&matchingModules, &matchingModuleTCP);
 }
@@ -586,7 +585,7 @@ static void openGraphDataFiles(SyncState* const syncState)
 
        matchingData= (MatchingDataTCP*) syncState->matchingData;
 
-       cwd= changeToGraphDir(syncState->graphsDir);
+       cwd= changeToGraphsDir(syncState->graphsDir);
 
        matchingData->messagePoints= malloc(syncState->traceNb * sizeof(FILE**));
        for (i= 0; i < syncState->traceNb; i++)
@@ -645,7 +644,7 @@ static void writeMessagePoint(FILE* stream, const Message* const message)
                y= message->inE->cpuTime;
        }
 
-       fprintf(stream, "%20llu %20llu\n", x, y);
+       fprintf(stream, "%20" PRIu64 " %20" PRIu64 "\n", x, y);
 }
 
 
This page took 0.02296 seconds and 4 git commands to generate.