perf tools: Convert to HAVE_STRLCPY
authorNamhyung Kim <namhyung.kim@lge.com>
Fri, 28 Sep 2012 09:32:08 +0000 (18:32 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 2 Oct 2012 21:36:24 +0000 (18:36 -0300)
For similar reason of previous patches, convert NO_STRLCPY to positive
HAVE_STRLCPY.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1348824728-14025-13-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile
tools/perf/util/cache.h
tools/perf/util/path.c

index 31a07f95fd98fc32396f4c36b4dcf9556189728b..5216ade909d013059a7a1c6d4e35ead10885c73d 100644 (file)
@@ -743,11 +743,9 @@ ifeq ($(NO_PERF_REGS),0)
        BASIC_CFLAGS += -DHAVE_PERF_REGS
 endif
 
-ifdef NO_STRLCPY
-       BASIC_CFLAGS += -DNO_STRLCPY
-else
-       ifneq ($(call try-cc,$(SOURCE_STRLCPY),),y)
-               BASIC_CFLAGS += -DNO_STRLCPY
+ifndef NO_STRLCPY
+       ifeq ($(call try-cc,$(SOURCE_STRLCPY),),y)
+               BASIC_CFLAGS += -DHAVE_STRLCPY
        endif
 endif
 
index 07aec06e44435e9974d39b9042ff3fdb353e6d95..2bd51370ad28867bec442ab2cb72c49e9652dc36 100644 (file)
@@ -107,7 +107,7 @@ extern char *perf_path(const char *fmt, ...) __attribute__((format (printf, 1, 2
 extern char *perf_pathdup(const char *fmt, ...)
        __attribute__((format (printf, 1, 2)));
 
-#ifdef NO_STRLCPY
+#ifndef HAVE_STRLCPY
 extern size_t strlcpy(char *dest, const char *src, size_t size);
 #endif
 
index bd74977114242ff465af39a291d30aa7d463f3b2..a8c49548ca48f5bc4f7ae14134ee57d7779b46e8 100644 (file)
@@ -22,7 +22,7 @@ static const char *get_perf_dir(void)
        return ".";
 }
 
-#ifdef NO_STRLCPY
+#ifndef HAVE_STRLCPY
 size_t strlcpy(char *dest, const char *src, size_t size)
 {
        size_t ret = strlen(src);