From: Nicholas Ormrod Date: Fri, 31 Oct 2014 17:55:44 +0000 (-0700) Subject: Fix/override bad symbol names X-Git-Tag: v0.22.0~212 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cbed222c1b9a10c3b67e04b8523aa8449c985b21;p=folly.git Fix/override bad symbol names Summary: Symbols containing two underscores, or starting with underscore followed by a capital letter, are reserved by the implementation. Fix the inappropriate cases, and nolint the ones which we are using correctly Test Plan: run unit tests Reviewed By: robbert@fb.com Subscribers: trunkagent, sdwilsh, njormrod, folly-diffs@ FB internal diff: D1650435 Tasks: 5486739 Signature: t1:1650435:1414713329:7844e7802ebabcac7ef21aef0becf71ba513afb0 --- diff --git a/folly/Checksum.cpp b/folly/Checksum.cpp index 881fc7d2..08b56433 100644 --- a/folly/Checksum.cpp +++ b/folly/Checksum.cpp @@ -25,6 +25,7 @@ namespace folly { namespace detail { #ifndef __has_builtin + /* nolint */ #define __has_builtin(x) 0 #endif diff --git a/folly/Portability.h b/folly/Portability.h index a9298af9..f35e3bbb 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -64,6 +64,7 @@ struct MaxAlign { char c; } __attribute__((__aligned__)); # ifdef _USE_ATTRIBUTES_FOR_SAL # undef _USE_ATTRIBUTES_FOR_SAL # endif +/* nolint */ # define _USE_ATTRIBUTES_FOR_SAL 1 # include # define FOLLY_PRINTF_FORMAT _Printf_format_string_ @@ -126,9 +127,11 @@ struct MaxAlign { char c; } __attribute__((__aligned__)); // portable version check #ifndef __GNUC_PREREQ # if defined __GNUC__ && defined __GNUC_MINOR__ +/* nolint */ # define __GNUC_PREREQ(maj, min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= \ ((maj) << 16) + (min)) # else +/* nolint */ # define __GNUC_PREREQ(maj, min) 0 # endif #endif @@ -235,6 +238,7 @@ typedef SSIZE_T ssize_t; # define strerror_r(errno,buf,len) strerror_s(buf,len,errno) // compiler specific to compiler specific +// nolint # define __PRETTY_FUNCTION__ __FUNCSIG__ #endif diff --git a/folly/io/async/EventFDWrapper.h b/folly/io/async/EventFDWrapper.h index 80a81735..39b7cd74 100644 --- a/folly/io/async/EventFDWrapper.h +++ b/folly/io/async/EventFDWrapper.h @@ -49,8 +49,10 @@ // arch/x86/include/asm/unistd_{32,64}.h #ifndef __NR_eventfd2 #if FOLLY_X64 +/* nolint */ #define __NR_eventfd2 290 #elif defined(__i386__) +/* nolint */ #define __NR_eventfd2 328 #else #error "Can't define __NR_eventfd2 for your architecture." diff --git a/folly/test/ThreadLocalTest.cpp b/folly/test/ThreadLocalTest.cpp index e2911744..4493c774 100644 --- a/folly/test/ThreadLocalTest.cpp +++ b/folly/test/ThreadLocalTest.cpp @@ -360,7 +360,7 @@ class FillObject { } // namespace -#if FOLLY_HAVE_STD__THIS_THREAD__SLEEP_FOR +#if FOLLY_HAVE_STD_THIS_THREAD_SLEEP_FOR TEST(ThreadLocal, Stress) { constexpr size_t numFillObjects = 250; std::array, numFillObjects> objects;