Commit cbed222c authored by Nicholas Ormrod's avatar Nicholas Ormrod Committed by Pavlo Kushnir

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
parent c55a29b4
......@@ -25,6 +25,7 @@ namespace folly {
namespace detail {
#ifndef __has_builtin
/* nolint */
#define __has_builtin(x) 0
#endif
......
......@@ -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
......
......@@ -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."
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment