Explorar o código

Include directory in filenames for allocation failure errors

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62440 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements %!s(int64=10) %!d(string=hai) anos
pai
achega
11efe0c79a
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  1. 1 1
      include/Make/Compile.make
  2. 3 3
      include/defs/gis.h

+ 1 - 1
include/Make/Compile.make

@@ -20,7 +20,7 @@ linker_c = $(call linker_x,$(CC))
 linker_cxx = $(call linker_x,$(CXX))
 linker = $(call linker_x,$(LINK))
 
-ALL_CFLAGS = $(LFS_CFLAGS) $(EXTRA_CFLAGS) $(NLS_CFLAGS) $(DEFS) $(EXTRA_INC) $(INC)
+ALL_CFLAGS = $(LFS_CFLAGS) $(EXTRA_CFLAGS) $(NLS_CFLAGS) $(DEFS) $(EXTRA_INC) $(INC) -DRELDIR=\"$(RELDIR)\"
 
 compiler_x = $(1) $(2) $(ALL_CFLAGS) -o $@ -c $<
 compiler_c = $(call compiler_x,$(CC),$(COMPILE_FLAGS_C) $($*_c_FLAGS))

+ 3 - 3
include/defs/gis.h

@@ -81,9 +81,9 @@ void *G_incr_void_ptr(const void *, size_t);
 #endif
 
 #ifndef CTYPESGEN
-#define G_malloc(n)     G__malloc(__FILE__, __LINE__, (n))
-#define G_calloc(m, n)  G__calloc(__FILE__, __LINE__, (m), (n))
-#define G_realloc(p, n) G__realloc(__FILE__, __LINE__, (p), (n))
+#define G_malloc(n)     G__malloc(RELDIR "/" __FILE__, __LINE__, (n))
+#define G_calloc(m, n)  G__calloc(RELDIR "/" __FILE__, __LINE__, (m), (n))
+#define G_realloc(p, n) G__realloc(RELDIR "/" __FILE__, __LINE__, (p), (n))
 #else
 #define G_malloc(n)     G__malloc("<ctypesgen>", 0, (n))
 #define G_calloc(m, n)  G__calloc("<ctypesgen>", 0, (m), (n))