Reviewers: Lei Zhang, jochen
CL:
https://codereview.chromium.org/2022793002/Message:
This is the full compile error I was getting:
FAILED:
obj/third_party/pdfium/xfa/fxbarcode/qrcode/xfa.BC_QRFinderPatternFinder.o
x86_64-pc-linux-gnu-g++ -MMD -MF
obj/third_party/pdfium/xfa/fxbarcode/qrcode/xfa.BC_QRFinderPatternFinder.o.d
-DPDF_ENABLE_XFA -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DDISABLE_NACL
-DCHROMIUM_BUILD -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_PANGO=1
-DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1
-DUSE_CLIPBOARD_AURAX11=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1
-DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_NOTIFICATIONS
-DENABLE_TOPCHROME_MD=1 -DUSE_UDEV -DFIELDTRIAL_TESTING_ENABLED
-DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGINS=1
-DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_PRINTING=1
-DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1
-DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1
-DENABLE_SERVICE_DISCOVERY=1 -DENABLE_HANGOUT_SERVICES_EXTENSION=1
-DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD
-DSAFE_BROWSING_DB_LOCAL -DFT2_BUILD_LIBRARY -DUSE_LIBPCI=1 -DUSE_GLIB=1
-DUSE_NSS_CERTS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen
-I../.. -I../../third_party/pdfium
-I../../third_party/pdfium/third_party/freetype/include
-I../../third_party/pdfium/third_party/freetype/include/freetype -I../../v8
-I../../v8/include -fstack-protector --param=ssp-buffer-size=4 -pthread
-fno-strict-aliasing -Wno-extra -Wno-unused-parameter
-Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC
-Wno-unused-local-typedefs -m64 -march=x86-64 -O2 -fno-ident -fdata-sections
-ffunction-sections -funwind-tables -O2 -pipe -fno-exceptions -fno-rtti
-fno-threadsafe-statics -fvisibility-inlines-hidden -Wno-deprecated -std=gnu++11
-Wno-narrowing -c
../../third_party/pdfium/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp -o
obj/third_party/pdfium/xfa/fxbarcode/qrcode/xfa.BC_QRFinderPatternFinder.o
In file included from
../../third_party/pdfium/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp:32:0:
../../third_party/pdfium/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp: In
member function ‘FX_BOOL CBC_QRFinderPatternFinder::HandlePossibleCenter(const
CFX_Int32Array&, int32_t, int32_t)’:
../../third_party/pdfium/xfa/fxbarcode/utils.h:34:31: error: ‘isnan’ was not
declared in this scope
#define FXSYS_isnan(x) isnan(x)
^
../../third_party/pdfium/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp:374:8:
note: in expansion of macro ‘FXSYS_isnan’
if (!FXSYS_isnan(centerI)) {
^
../../third_party/pdfium/xfa/fxbarcode/utils.h:34:31: note: suggested
alternative:
#define FXSYS_isnan(x) isnan(x)
^
../../third_party/pdfium/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp:374:8:
note: in expansion of macro ‘FXSYS_isnan’
if (!FXSYS_isnan(centerI)) {
^
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/random:38:0,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/bits/stl_algo.h:66,
from
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/algorithm:62,
from ../../third_party/pdfium/core/fxcrt/include/fx_basic.h:10,
from
../../third_party/pdfium/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.h:10,
from
../../third_party/pdfium/xfa/fxbarcode/qrcode/BC_QRFinderPatternFinder.cpp:23:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/include/g++-v5/cmath:641:5: note:
‘std::isnan’
isnan(_Tp __x)
^
Description:
Fix compile error ‘isnan’ was not declared in this scope
BUG=none
Base URL:
https://pdfium.googlesource.com/pdfium.git@masterAffected files (+2, -4 lines):
M xfa/fxbarcode/utils.h
Index: xfa/fxbarcode/utils.h
diff --git a/xfa/fxbarcode/utils.h b/xfa/fxbarcode/utils.h
index ca2f3214c0d38c7f2da92955bed5f09c3b40309d..dadf34859d6ff31a5bcc5375837a3418cbb5cc09 100644
--- a/xfa/fxbarcode/utils.h
+++ b/xfa/fxbarcode/utils.h
@@ -26,12 +26,10 @@ void BC_FX_ByteString_Append(CFX_ByteString& dst, const CFX_ByteArray& ba);
#endif
#if (_FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_)
#define FXSYS_isnan(x) _isnan(x)
-#elif(_FX_OS_ == _FX_MACOSX_ || _FX_OS_ == _FX_IOS_)
+#elif(_FX_OS_ == _FX_MACOSX_ || _FX_OS_ == _FX_IOS_ || \
+ _FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_ANDROID_)
#include <cmath>
#define FXSYS_isnan(x) std::isnan(x)
-#elif(_FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_ANDROID_)
-#include <math.h>
-#define FXSYS_isnan(x) isnan(x)
#endif
#if (_FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_)
#define FXSYS_nan() (std::numeric_limits<float>::quiet_NaN())