diff options
author | Robert Ginda <rginda@chromium.org> | 2015-08-04 15:24:15 -0700 |
---|---|---|
committer | Robert Ginda <rginda@chromium.org> | 2015-08-11 11:16:45 -0700 |
commit | 8e46e738cae449bf44232c66e973c8e9e15fbcb5 (patch) | |
tree | 79c6f758aaa9ae4de20ea966235f0c0272c88a4f /avahi-common | |
parent | 57cc59c1868f186da5b9dc3fc63dbab3fe2ce54c (diff) | |
download | avahi-8e46e738cae449bf44232c66e973c8e9e15fbcb5.tar.gz |
rename avahi-common/malloc.[ch] to avahi-malloc.
This is to avoid clashing with the system malloc.h, which occurs
in an android build beacause of the order of the generated includes.
This change was generated with the script:
cat > rename_malloc.sh <<EOF
replace() {
local search="$1"
local replace="$2"
FILES=$(grep -l "$search" $(find . -name '*.[ch]'))
for file in $FILES; do
echo $file
sed "s|$search|$replace|" < $file > sed.tmp
mv sed.tmp $file
done
}
replace "include \"malloc.h\"" "include \"avahi-malloc.h\""
replace "include \"avahi-common/malloc.h\"" \
"include \"avahi-common/avahi-malloc.h\""
replace "include <avahi-common/malloc.h>" \
"include \"avahi-common/avahi-malloc.h\""
EOF
Bug: 22827641
Change-Id: I1eeb4a57993650d8aae62f0686942cfac367b9a8
Diffstat (limited to 'avahi-common')
-rw-r--r-- | avahi-common/Makefile.am | 12 | ||||
-rw-r--r-- | avahi-common/address.c | 2 | ||||
-rw-r--r-- | avahi-common/alternative-test.c | 2 | ||||
-rw-r--r-- | avahi-common/alternative.c | 2 | ||||
-rw-r--r-- | avahi-common/avahi-malloc.c (renamed from avahi-common/malloc.c) | 2 | ||||
-rw-r--r-- | avahi-common/avahi-malloc.h (renamed from avahi-common/malloc.h) | 0 | ||||
-rw-r--r-- | avahi-common/dbus-watch-glue.c | 2 | ||||
-rw-r--r-- | avahi-common/domain-test.c | 2 | ||||
-rw-r--r-- | avahi-common/domain.c | 2 | ||||
-rw-r--r-- | avahi-common/rlist.c | 2 | ||||
-rw-r--r-- | avahi-common/simple-watch.c | 2 | ||||
-rw-r--r-- | avahi-common/strlst-test.c | 2 | ||||
-rw-r--r-- | avahi-common/strlst.c | 2 | ||||
-rw-r--r-- | avahi-common/thread-watch.c | 2 |
14 files changed, 18 insertions, 18 deletions
diff --git a/avahi-common/Makefile.am b/avahi-common/Makefile.am index 3118b0b..52c0c22 100644 --- a/avahi-common/Makefile.am +++ b/avahi-common/Makefile.am @@ -29,7 +29,7 @@ avahi_commoninclude_HEADERS = \ domain.h \ cdecl.h \ defs.h \ - malloc.h \ + avahi-malloc.h \ watch.h \ timeval.h \ simple-watch.h \ @@ -54,7 +54,7 @@ lib_LTLIBRARIES = \ libavahi-common.la libavahi_common_la_SOURCES = \ - malloc.c malloc.h \ + avahi-malloc.c avahi-malloc.h \ address.c address.h \ alternative.c alternative.h \ error.c error.h \ @@ -74,13 +74,13 @@ libavahi_common_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBAVAHI_COMMON_VERS strlst_test_SOURCES = \ strlst.c strlst.h \ - malloc.c malloc.h \ + avahi-malloc.c avahi-malloc.h \ strlst-test.c strlst_test_CFLAGS = $(AM_CFLAGS) alternative_test_SOURCES = \ alternative.c alternative.h \ - malloc.c malloc.h \ + avahi-malloc.c avahi-malloc.h \ domain.c domain.h \ address.c address.h \ alternative-test.c \ @@ -89,7 +89,7 @@ alternative_test_CFLAGS = $(AM_CFLAGS) domain_test_SOURCES = \ domain.c domain.h \ - malloc.c malloc.h \ + avahi-malloc.c avahi-malloc.h \ address.c address.h \ domain-test.c \ utf8.c utf8.h @@ -99,7 +99,7 @@ watch_test_SOURCES = \ timeval.c timeval.h \ simple-watch.c simple-watch.h \ watch.h \ - malloc.c malloc.h \ + avahi-malloc.c avahi-malloc.h \ watch-test.c watch_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS) watch_test_LDADD = $(AM_LDADD) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS) diff --git a/avahi-common/address.c b/avahi-common/address.c index e8f6148..0973cc1 100644 --- a/avahi-common/address.c +++ b/avahi-common/address.c @@ -30,7 +30,7 @@ #include <stdio.h> #include "address.h" -#include "malloc.h" +#include "avahi-malloc.h" static size_t address_get_size(const AvahiAddress *a) { assert(a); diff --git a/avahi-common/alternative-test.c b/avahi-common/alternative-test.c index 9255435..5fb4bce 100644 --- a/avahi-common/alternative-test.c +++ b/avahi-common/alternative-test.c @@ -24,7 +24,7 @@ #include <stdio.h> #include "alternative.h" -#include "malloc.h" +#include "avahi-malloc.h" #include "domain.h" int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { diff --git a/avahi-common/alternative.c b/avahi-common/alternative.c index b3d39f0..454622f 100644 --- a/avahi-common/alternative.c +++ b/avahi-common/alternative.c @@ -27,7 +27,7 @@ #include <assert.h> #include "alternative.h" -#include "malloc.h" +#include "avahi-malloc.h" #include "domain.h" #include "utf8.h" diff --git a/avahi-common/malloc.c b/avahi-common/avahi-malloc.c index 23b13a9..2d0ca33 100644 --- a/avahi-common/malloc.c +++ b/avahi-common/avahi-malloc.c @@ -27,7 +27,7 @@ #include <stdio.h> #include <unistd.h> -#include "malloc.h" +#include "avahi-malloc.h" #ifndef va_copy #ifdef __va_copy diff --git a/avahi-common/malloc.h b/avahi-common/avahi-malloc.h index ffaac3f..ffaac3f 100644 --- a/avahi-common/malloc.h +++ b/avahi-common/avahi-malloc.h diff --git a/avahi-common/dbus-watch-glue.c b/avahi-common/dbus-watch-glue.c index b18f555..da5c30c 100644 --- a/avahi-common/dbus-watch-glue.c +++ b/avahi-common/dbus-watch-glue.c @@ -24,7 +24,7 @@ #include <assert.h> #include <stdio.h> -#include "malloc.h" +#include "avahi-malloc.h" #include "timeval.h" #include "dbus-watch-glue.h" diff --git a/avahi-common/domain-test.c b/avahi-common/domain-test.c index cf763ec..ecee697 100644 --- a/avahi-common/domain-test.c +++ b/avahi-common/domain-test.c @@ -26,7 +26,7 @@ #include <assert.h> #include "domain.h" -#include "malloc.h" +#include "avahi-malloc.h" int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { char *s; diff --git a/avahi-common/domain.c b/avahi-common/domain.c index 3b1ab68..d4d6143 100644 --- a/avahi-common/domain.c +++ b/avahi-common/domain.c @@ -32,7 +32,7 @@ #include <assert.h> #include "domain.h" -#include "malloc.h" +#include "avahi-malloc.h" #include "error.h" #include "address.h" #include "utf8.h" diff --git a/avahi-common/rlist.c b/avahi-common/rlist.c index 17dcb24..409846c 100644 --- a/avahi-common/rlist.c +++ b/avahi-common/rlist.c @@ -24,7 +24,7 @@ #include <stdlib.h> #include "rlist.h" -#include "malloc.h" +#include "avahi-malloc.h" AvahiRList* avahi_rlist_prepend(AvahiRList *r, void *data) { AvahiRList *n; diff --git a/avahi-common/simple-watch.c b/avahi-common/simple-watch.c index 8df18dd..f8b5948 100644 --- a/avahi-common/simple-watch.c +++ b/avahi-common/simple-watch.c @@ -30,7 +30,7 @@ #include <stdio.h> #include "llist.h" -#include "malloc.h" +#include "avahi-malloc.h" #include "timeval.h" #include "simple-watch.h" diff --git a/avahi-common/strlst-test.c b/avahi-common/strlst-test.c index 0945b37..d265d4f 100644 --- a/avahi-common/strlst-test.c +++ b/avahi-common/strlst-test.c @@ -25,7 +25,7 @@ #include <assert.h> #include "strlst.h" -#include "malloc.h" +#include "avahi-malloc.h" int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { char *t, *v; diff --git a/avahi-common/strlst.c b/avahi-common/strlst.c index b861cf8..e495634 100644 --- a/avahi-common/strlst.c +++ b/avahi-common/strlst.c @@ -28,7 +28,7 @@ #include <stdlib.h> #include "strlst.h" -#include "malloc.h" +#include "avahi-malloc.h" #include "defs.h" AvahiStringList*avahi_string_list_add_anonymous(AvahiStringList *l, size_t size) { diff --git a/avahi-common/thread-watch.c b/avahi-common/thread-watch.c index c0cadeb..3eabb15 100644 --- a/avahi-common/thread-watch.c +++ b/avahi-common/thread-watch.c @@ -32,7 +32,7 @@ #include <signal.h> #include "llist.h" -#include "malloc.h" +#include "avahi-malloc.h" #include "timeval.h" #include "simple-watch.h" #include "thread-watch.h" |