[haiku-commits] haiku: hrev49774 - src/system/libroot/posix/glibc/include/arch/x86/bits headers/private/kernel/util src/system/boot/loader/file_systems/tarfs src/system/boot/loader/file_systems/fat

  • From: jerome.duval@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 8 Nov 2015 00:40:03 +0100 (CET)

hrev49774 adds 3 changesets to branch 'master'
old head: f10b49ed414c698ce4637231073fc76cba141398
new head: 6c4cca34c25eefded9a3899bdafeeb9d50666f16
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=6c4cca34c25e+%5Ef10b49ed414c

----------------------------------------------------------------------------

b49dd60c46d9: Drop namespace std after 95d4ed6778c138150a29.

7ccbb2f03f42: Add operator delete(void *, size_t) for C++14.

6c4cca34c25e: glibc: replace extern __inline with __extern_always_inline for
x86.

* also update __atan2l for x86, update __FAST_MATH sections.

[ Jérôme Duval <jerome.duval@xxxxxxxxx> ]

----------------------------------------------------------------------------

4 files changed, 24 insertions(+), 7 deletions(-)
headers/private/kernel/util/kernel_cpp.h | 10 ++++++++++
.../boot/loader/file_systems/fat/Directory.cpp | 2 +-
src/system/boot/loader/file_systems/tarfs/tarfs.cpp | 2 +-
.../posix/glibc/include/arch/x86/bits/mathinline.h | 17 ++++++++++++-----

############################################################################

Commit: b49dd60c46d920e6eca1f38e71ae386736e6abc0
URL: http://cgit.haiku-os.org/haiku/commit/?id=b49dd60c46d9
Author: Jérôme Duval <jerome.duval@xxxxxxxxx>
Date: Sat Nov 7 22:58:33 2015 UTC

Drop namespace std after 95d4ed6778c138150a29.

----------------------------------------------------------------------------

diff --git a/src/system/boot/loader/file_systems/fat/Directory.cpp
b/src/system/boot/loader/file_systems/fat/Directory.cpp
index 559dae6..8aa1e9f 100644
--- a/src/system/boot/loader/file_systems/fat/Directory.cpp
+++ b/src/system/boot/loader/file_systems/fat/Directory.cpp
@@ -514,7 +514,7 @@ Directory::CreateFile(const char* name, mode_t permissions,
Node** _node)
return error;

// create a File object
- File* file = new(std::nothrow) File(fVolume, entryOffset,
+ File* file = new(nothrow) File(fVolume, entryOffset,
entry.Cluster(fVolume.FatBits()), entry.Size(), name);
if (file == NULL)
return B_NO_MEMORY;
diff --git a/src/system/boot/loader/file_systems/tarfs/tarfs.cpp
b/src/system/boot/loader/file_systems/tarfs/tarfs.cpp
index 83e29e3..552d800 100644
--- a/src/system/boot/loader/file_systems/tarfs/tarfs.cpp
+++ b/src/system/boot/loader/file_systems/tarfs/tarfs.cpp
@@ -358,7 +358,7 @@ TarFS::Directory::Open(void** _cookie, int mode)
_inherited::Open(_cookie, mode);

EntryIterator* iterator
- = new(std::nothrow) EntryIterator(fEntries.GetIterator());
+ = new(nothrow) EntryIterator(fEntries.GetIterator());
if (iterator == NULL)
return B_NO_MEMORY;


############################################################################

Commit: 7ccbb2f03f42b701aaf8195ef4bcb0d912da009c
URL: http://cgit.haiku-os.org/haiku/commit/?id=7ccbb2f03f42
Author: Jérôme Duval <jerome.duval@xxxxxxxxx>
Date: Sat Nov 7 23:01:03 2015 UTC

Add operator delete(void *, size_t) for C++14.

----------------------------------------------------------------------------

diff --git a/headers/private/kernel/util/kernel_cpp.h
b/headers/private/kernel/util/kernel_cpp.h
index 728f32e..89ac147 100644
--- a/headers/private/kernel/util/kernel_cpp.h
+++ b/headers/private/kernel/util/kernel_cpp.h
@@ -33,6 +33,16 @@ extern void operator delete(void *ptr) throw ();
extern void operator delete[](void *ptr) throw ();
#endif

+#if __cplusplus >= 201402L
+
+inline void
+operator delete(void *ptr, size_t size) throw ()
+{
+ free(ptr);
+}
+
+#endif // __cplusplus >= 201402L
+
#endif // #if _KERNEL_MODE

#endif // __cplusplus

############################################################################

Revision: hrev49774
Commit: 6c4cca34c25eefded9a3899bdafeeb9d50666f16
URL: http://cgit.haiku-os.org/haiku/commit/?id=6c4cca34c25e
Author: Jérôme Duval <jerome.duval@xxxxxxxxx>
Date: Sat Nov 7 23:33:00 2015 UTC

glibc: replace extern __inline with __extern_always_inline for x86.

* also update __atan2l for x86, update __FAST_MATH sections.

----------------------------------------------------------------------------

diff --git a/src/system/libroot/posix/glibc/include/arch/x86/bits/mathinline.h
b/src/system/libroot/posix/glibc/include/arch/x86/bits/mathinline.h
index e8091df..1288804 100644
--- a/src/system/libroot/posix/glibc/include/arch/x86/bits/mathinline.h
+++ b/src/system/libroot/posix/glibc/include/arch/x86/bits/mathinline.h
@@ -22,10 +22,10 @@
# error "Never use <bits/mathinline.h> directly; include <math.h> instead."
#endif

-#ifdef __cplusplus
+#ifndef __extern_always_inline
# define __MATH_INLINE __inline
#else
-# define __MATH_INLINE extern __inline
+# define __MATH_INLINE __extern_always_inline
#endif


@@ -416,14 +416,21 @@ __inline_mathcodeNP (tan, __x, \
#endif /* __FAST_MATH__ */


+# if __GNUC_PREREQ (3, 4)
+__inline_mathcodeNP2_ (long double, __atan2l, __y, __x,
+ return __builtin_atan2l (__y, __x))
+# else
#define __atan2_code \
register long double __value;
\
__asm __volatile__ \
("fpatan" \
: "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); \
return __value
+# ifdef __FAST_MATH__
__inline_mathcodeNP2 (atan2, __y, __x, __atan2_code)
+# endif
__inline_mathcodeNP2_ (long double, __atan2l, __y, __x, __atan2_code)
+# endif


__inline_mathcodeNP2 (fmod, __x, __y, \
@@ -511,6 +518,7 @@ __inline_mathcodeNP (ceil, __x, \
__asm __volatile ("fldcw %0" : : "m" (__cw));
\
return __value)

+#ifdef __FAST_MATH__
#define __ldexp_code \
register long double __value;
\
__asm __volatile__ \
@@ -523,6 +531,7 @@ ldexp (double __x, int __y) __THROW
{
__ldexp_code;
}
+#endif


/* Optimized versions for some non-standardized functions. */
@@ -530,7 +539,6 @@ ldexp (double __x, int __y) __THROW

# ifdef __FAST_MATH__
__inline_mathcodeNP (expm1, __x, __expm1_code)
-# endif

/* We cannot rely on M_SQRT being defined. So we do it for ourself
here. */
@@ -573,12 +581,12 @@ __inline_mathcodeNP(logb, __x, \
: "=t" (__junk), "=u" (__value) : "0" (__x)); \
return __value)

+# endif
#endif

#ifdef __USE_ISOC99
#ifdef __FAST_MATH__
__inline_mathop_declNP (log2, "fld1; fxch; fyl2x", "0" (__x) : "st(1)")
-#endif /* __FAST_MATH__ */

__MATH_INLINE float
ldexpf (float __x, int __y) __THROW
@@ -592,7 +600,6 @@ ldexpl (long double __x, int __y) __THROW
__ldexp_code;
}

-#ifdef __FAST_MATH__
__inline_mathcodeNP3 (fma, __x, __y, __z, return (__x * __y) + __z)

__inline_mathopNP (rint, "frndint")


Other related posts:

  • » [haiku-commits] haiku: hrev49774 - src/system/libroot/posix/glibc/include/arch/x86/bits headers/private/kernel/util src/system/boot/loader/file_systems/tarfs src/system/boot/loader/file_systems/fat - jerome . duval