[libdispatch-dev] [PATCH 08/17] finish moving stuff into src/shims
Paolo Bonzini
bonzini at gnu.org
Sun Oct 18 08:04:08 PDT 2009
The last file from compat/ can now be moved almost untouched into
src/shims, thus unifying the terminology.
---
src/internal.h | 4 ----
src/os_shims.h | 1 +
{compat => src/shims}/malloc_zone.h | 2 ++
3 files changed, 3 insertions(+), 4 deletions(-)
rename {compat => src/shims}/malloc_zone.h (98%)
diff --git a/src/internal.h b/src/internal.h
index 3ecb440..8fe987e 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -32,10 +32,6 @@
#define __DISPATCH_BUILDING_DISPATCH__
#define __DISPATCH_INDIRECT__
-#ifndef HAVE_MALLOC_CREATE_ZONE
-#include <compat/malloc_zone.h>
-#endif
-
#ifdef HAVE_AVAILABILITY_H
#include <Availability.h>
#endif
diff --git a/src/os_shims.h b/src/os_shims.h
index 170362d..4c7dd54 100644
--- a/src/os_shims.h
+++ b/src/os_shims.h
@@ -46,6 +46,7 @@ __private_extern__ const char *__crashreporter_info__;
#define FD_COPY(f, t) (void)(*(t) = *(f))
#endif
+#include "shims/malloc_zone.h"
#include "shims/tsd.h"
#include "shims/perfmon.h"
#include "shims/time.h"
diff --git a/compat/malloc_zone.h b/src/shims/malloc_zone.h
similarity index 98%
rename from compat/malloc_zone.h
rename to src/shims/malloc_zone.h
index 88be0c1..d2505ec 100644
--- a/compat/malloc_zone.h
+++ b/src/shims/malloc_zone.h
@@ -29,6 +29,7 @@
* Implement malloc zones as a simple wrapper around malloc(3) on systems
* that don't support them.
*/
+#ifndef HAVE_MALLOC_CREATE_ZONE
typedef void * malloc_zone_t;
static inline malloc_zone_t *
@@ -102,5 +103,6 @@ malloc_set_zone_name(malloc_zone_t *zone, const char *name)
/* No-op. */
}
+#endif
#endif /* __COMPAT_MALLOC_ZONE_H__ */
--
1.6.2.5
More information about the libdispatch-dev
mailing list