Fix/override bad symbol names
authorNicholas Ormrod <njormrod@fb.com>
Fri, 31 Oct 2014 17:55:44 +0000 (10:55 -0700)
committerPavlo Kushnir <pavlo@fb.com>
Sat, 8 Nov 2014 02:17:45 +0000 (18:17 -0800)
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

folly/Checksum.cpp
folly/Portability.h
folly/io/async/EventFDWrapper.h
folly/test/ThreadLocalTest.cpp

index 881fc7d20ff1ff3aa483319c4d290e5fd585e153..08b5643372ec3e8a73d13665544e91229cc4ce5a 100644 (file)
@@ -25,6 +25,7 @@ namespace folly {
 namespace detail {
 
 #ifndef __has_builtin
+  /* nolint */
   #define __has_builtin(x) 0
 #endif
 
index a9298af99199c151aba79f7f4432990251b74302..f35e3bbb9d8daf8048005bb5b8699d3b230a6954 100644 (file)
@@ -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 <sal.h>
 # 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
 
index 80a81735e9bea4048cdc2116aaa7799a87d52d15..39b7cd74fed639e7fb5d19eba2cfbd42fc0ee3ed 100644 (file)
 // 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."
index e2911744e47937357086c76d52bacc35c8dae847..4493c774fc4d3f773e3e9562ab4f1a6962c07d4f 100644 (file)
@@ -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<ThreadLocalPtr<FillObject>, numFillObjects> objects;