Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: gdb/gnulib/import/isnanl-nolibm.h

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/gnulib/import/isnanl.c ('k') | gdb/gnulib/import/itold.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/gnulib/import/isnanl-nolibm.h
diff --git a/gdb/gnulib/import/strnlen1.h b/gdb/gnulib/import/isnanl-nolibm.h
similarity index 53%
copy from gdb/gnulib/import/strnlen1.h
copy to gdb/gnulib/import/isnanl-nolibm.h
index 4c4f0c0813c1a2e8ca0854f5fa07a5b45527d642..58d963dbc39699a1f363031534f8c6e352990b16 100644
--- a/gdb/gnulib/import/strnlen1.h
+++ b/gdb/gnulib/import/isnanl-nolibm.h
@@ -1,5 +1,5 @@
-/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc.
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,27 +14,20 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef _STRNLEN1_H
-#define _STRNLEN1_H
-
-#include <stddef.h>
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- If no '\0' terminator is found in that many characters, return MAXLEN. */
-/* This is the same as strnlen (string, maxlen - 1) + 1. */
-extern size_t strnlen1 (const char *string, size_t maxlen)
- _GL_ATTRIBUTE_PURE;
-
-
-#ifdef __cplusplus
-}
+#if HAVE_ISNANL_IN_LIBC
+/* Get declaration of isnan macro or (older) isnanl function. */
+# include <math.h>
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnanl
+# define isnanl(x) __builtin_isnanl ((long double)(x))
+# elif defined isnan
+# undef isnanl
+# define isnanl(x) isnan ((long double)(x))
+# endif
+#else
+/* Test whether X is a NaN. */
+# undef isnanl
+# define isnanl rpl_isnanl
+extern int isnanl (long double x);
#endif
-
-
-#endif /* _STRNLEN1_H */
« no previous file with comments | « gdb/gnulib/import/isnanl.c ('k') | gdb/gnulib/import/itold.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698