[libgsystem] Include local allocation macros by default



commit 18a925895d54fa539ff52182695945b819eddd36
Author: Colin Walters <walters verbum org>
Date:   Fri May 3 09:21:37 2013 -0400

    Include local allocation macros by default
    
    ...but still avoid using them in the other parts of libgsystem itself.
    The reason for this is that at least some of the code ideally would go
    upstream to glib where we can't use them, and downporting is so
    tedious.

 gsystem-console.c    |    1 +
 gsystem-file-utils.c |    1 +
 gsystem-log.c        |    1 +
 gsystem-shutil.c     |    1 +
 gsystem-subprocess.c |    1 +
 libgsystem.h         |    5 ++++-
 6 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gsystem-console.c b/gsystem-console.c
index 72d5d9b..00bb94d 100644
--- a/gsystem-console.c
+++ b/gsystem-console.c
@@ -20,6 +20,7 @@
 
 #include "config.h"
 
+#define _GSYSTEM_NO_LOCAL_ALLOC
 #include "libgsystem.h"
 
 /**
diff --git a/gsystem-file-utils.c b/gsystem-file-utils.c
index cdeb912..38b8420 100644
--- a/gsystem-file-utils.c
+++ b/gsystem-file-utils.c
@@ -27,6 +27,7 @@
 
 #include <string.h>
 
+#define _GSYSTEM_NO_LOCAL_ALLOC
 #include "libgsystem.h"
 #include <glib/gstdio.h>
 #include <gio/gunixinputstream.h>
diff --git a/gsystem-log.c b/gsystem-log.c
index be90878..bb3675c 100644
--- a/gsystem-log.c
+++ b/gsystem-log.c
@@ -30,6 +30,7 @@
 #endif
 #include <glib-unix.h>
 
+#define _GSYSTEM_NO_LOCAL_ALLOC
 #include "libgsystem.h"
 
 /**
diff --git a/gsystem-shutil.c b/gsystem-shutil.c
index 4070ba4..7fe9be7 100644
--- a/gsystem-shutil.c
+++ b/gsystem-shutil.c
@@ -25,6 +25,7 @@
 #define _GNU_SOURCE
 #endif
 
+#define _GSYSTEM_NO_LOCAL_ALLOC
 #include "libgsystem.h"
 #include <glib-unix.h>
 #include <sys/stat.h>
diff --git a/gsystem-subprocess.c b/gsystem-subprocess.c
index 8263b6e..be23e21 100644
--- a/gsystem-subprocess.c
+++ b/gsystem-subprocess.c
@@ -18,6 +18,7 @@
 
 #include "config.h"
 
+#define _GSYSTEM_NO_LOCAL_ALLOC
 #include "libgsystem.h"
 
 /**
diff --git a/libgsystem.h b/libgsystem.h
index d2fa608..2dc13a6 100644
--- a/libgsystem.h
+++ b/libgsystem.h
@@ -1,6 +1,6 @@
 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
  *
- * Copyright (C) 2012 Colin Walters <walters verbum org>.
+ * Copyright (C) 2012,2013 Colin Walters <walters verbum org>.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -30,6 +30,9 @@ G_BEGIN_DECLS
 #include <gsystem-shutil.h>
 #include <gsystem-subprocess.h>
 #include <gsystem-log.h>
+#ifndef _GSYSTEM_NO_LOCAL_ALLOC
+#include <gsystem-local-alloc.h>
+#endif
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]