| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
Approved by: dim (mentor)
|
|
|
|
|
|
| |
migrated to sys/vnode.h.
Submitted by: gianni
|
|
|
|
|
|
|
|
| |
would not compile anymore, due to plain 'inline' keywords. Fix this by
using __inline instead.
Reported by: Jia-Shiun Li <jiashiun@gmail.com>
Discussed with: theraven
|
|
|
|
|
|
| |
universe with gcc.
Approved by: dim (mentor)
|
|
|
|
|
|
| |
universe with them. Sorry for the breakage.
Pointy hat to: me and brooks
|
|
|
|
|
|
| |
consistency.
Approved by: brooks (mentor)
|
|
|
|
|
|
|
| |
The lang/gcc* ports patch headers where they think something is
non-standard. These patched headers override the system headers which means
you have to rebuild these ports whenever you do installworld to make sure
they contain the latest changes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Address performance regressions encountered by das@ by caching per-thread
data in TLS where available.
- Add a __NO_TLS flag to cdefs.h to indicate where not available.
- Reorganise the xlocale.h definitions into xlocale/*.h so that they can be
included from multiple places.
- Export the POSIX2008 subset of xlocale when POSIX2008 says it should be
exported, independently of whether xlocale.h is included.
- Fix the bug where programs using ctype functions always assumed ASCII unless
recompiled.
- Fix some style(9) violations.
Reviewed by: brooks (mentor)
Approved by: dim (mentor)
|
|
|
|
|
|
| |
set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.
MFC after: 1 week
|
|
|
|
| |
Reported by: tijl
|
|
|
|
|
| |
Reviewed by: ed
Approved by: dim (mentor)
|
|
|
|
|
|
|
|
|
|
|
| |
builtins, rather than the __asm hack. Somehow I missed the existence of this
builtin originally and only noticed that it was there when I went to implement
it...
Note: Trunk clang now has support for (most of) the C[++]11 atomics stuff.
Please test!
Approved by: brooks (mentor)
|
|
|
|
|
|
|
|
|
| |
Plain 'va_list' in this header seems to cause troubles with non-base GCC
which creates and uses "tortured" versions of some sysem header files
including stdio.h (installed in a private 'include-fixed' directory).
Reviewed by: theraven
X-MFC with: r227753
|
|
|
|
|
| |
The _explicit versions only have two parameters, namely the object and
the order. There is no need to pass the values of the atomic variable.
|
|
|
|
|
|
|
|
|
| |
The C11 folks reinvented the wheel by introducing an aligned version of
malloc(3) called aligned_alloc(3), instead of posix_memalign(3). Instead
of returning the allocation by reference, it returns the address, just
like malloc(3).
Reviewed by: jasone@
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
descriptor.
Requested and tested by: des (previous version)
Reviewed by: des, kan (previous version)
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was thinking by myself, if the new code doesn't work with GCC 4.2, why
not simply turn it into an efficient version for C11 compilers? By
changing the code to use _Generic() directly in that case, I can build
the tgmath regression test in a matter of milliseconds with Clang,
instead of the 8 seconds it used to take.
So by the time C11 becomes the default, it will pick up the new code
automatically. And now I will refrain from making more changes to
<tgmath.h>.
|
|
|
|
|
|
|
| |
Instead of using an exponential number of cases with respect to the
number of arguments, this version only uses a linear number.
Unfortunately, it works with Clang, GCC 4.6 and GCC 4.7, but not GCC
4.2. Therefore, leave it commented out.
|
|
|
|
| |
Mea culpa.
|
|
|
|
|
| |
This removes the use of __typeof() from this header, thus making it work
with a plain C11 compiler.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out our GCC has quite an interesting bug:
typeof(1.0fi) != float _Complex
typeof((float _Complex)1.0fi) != float _Complex
typeof((float _Complex)1.0i) == float _Complex
In other words: if casting to an equal size, GCC seems to take a
shortcut. By casting down from a double to a float, GCC doesn't take
this shortcut, yielding the proper type.
To prevent foot-shooting, add a _Static_assert() to guarantee that
_Complex_I is always a float _Complex. I'm not going to MFC this part of
the diff.
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
| |
The macro construction used now, is almost identical to the code
provided in C11 proposal N1404. This new version doesn't seem to
introduce any regressions according to the regression test in tools/,
but still seems to malfunction with Clang on certain aspects.
The new code does work successfully with GCC 4.2, 4.6 and 4.7. With 4.7,
it also works when __generic() is implemented on top of _Generic().
Discussed with: stefanf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no way one could possibly use this header file in combination
with C++ code. The problem is that in C11 the `noreturn' macro expands
to the `_Noreturn' function specifier, while in C++11 the `noreturn'
keyword is an attribute.
So in C11 you have to write:
noreturn void exit(int status);
While in C++11 you have to write:
[[noreturn]] void exit(int status);
It is impossible to #define noreturn for C++ in such a way that it
allows both conventions.
By intentionally breaking this header this way, we prevent people from
using this header in their C++<11 sources.
|
|
|
|
|
| |
These macros are supposed to be invoked as regular functions, so remove
them.
|
|
|
|
|
|
|
|
|
| |
The development version of GCC also supports an atomics interface
similar to Clang's. Change the header file to work as follows:
- __CLANG_ATOMICS: Use Clang's new atomics interface,
- __GNUC_ATOMICS: Use GCC's new atomics interface,
- else: fall back to GCC's __sync interface.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even though _Static_assert() is pretty robust for C code, it cannot work
correctly with C++ code. This is due to the fact that C++ template
parameters may contain commas that are not enclosed in parentheses. For
example:
static_assert(foo<int, int>::bar == baz, "...");
This causes _Static_assert to be called with an excessive number of
parameters. If you want to use static_assert in C++, just use a C++11
compiler.
Reported on: current@, ports@
|
|
|
|
|
|
|
|
|
|
| |
P_tmpdir [OB XSI] Default directory prefix for tempnam().
This macro is used in a lot of places in legacy applications,
and is why we see a lot of programs written for e.g. Linux
store volatile temporary files in /var/tmp and not /tmp.
MFC after: 2 months
|
|
|
|
|
|
|
|
| |
- Make atomic_init() work for GCC, as assigning to structs doesn't work.
- Fix misplaced parenthesis in atomic_is_lock_free() for GCC.
- Make atomic_compare_exchange_strong() for GCC return the proper
boolean value, whether object == expected.
- Fix argument passing in atomic_exchange_explicit() for GCC.
|
| |
|
|
|
|
|
|
|
| |
- Add missing semicolon to quick_exit(),
- Remove `func' parameter name from at_quick_exit(),
- Fix indentation.
- Compare against 2011 value.
|
|
|
|
|
| |
Remove trailing whitespace and place all macro definitions at the same
column.
|
|
|
|
| |
The value field in the atomic structure is called __val; not value.
|
|
|
|
|
|
|
| |
Even though these header files make little sense to me, they are part of
the standard. By including these header files, you can simply use
`alignas', `alignof' and `noreturn' instead of the underscore-prefixed
versions.
|
|
|
|
|
| |
There is no reason why <stdbool.h> needs an include guard. It is already
protected by __bool_true_false_are_defined.
|
|
|
|
|
| |
Reported by: swills
Approved by: dim (mentor)
|
|
|
|
| |
Approved by: dim (mentor)
|
|
|
|
|
|
|
|
|
| |
tested) with clang and gcc, and more efficiently with clang+a big out-of-tree
diff that I need to commit soon (once it's been tidied and reviewed a bit).
Large portions by: ed
Reviewed by: ed
Approved by: dim (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an API for alerting internal libc routines to the presence of
"unsafe" paths post-chroot, and use it in ftpd. [11:07]
Fix a buffer overflow in telnetd. [11:08]
Make pam_ssh ignore unpassphrased keys unless the "nullok" option is
specified. [11:09]
Add sanity checking of service names in pam_start. [11:10]
Approved by: so (cperciva)
Approved by: re (bz)
Security: FreeBSD-SA-11:06.bind
Security: FreeBSD-SA-11:07.chroot
Security: FreeBSD-SA-11:08.telnetd
Security: FreeBSD-SA-11:09.pam_ssh
Security: FreeBSD-SA-11:10.pam
|
|
|
|
|
|
|
| |
PR: kern/161958
Submitted by: Henning Petersen <henning.petersen@t-online.de>
Approved by: jilles
MFC after: 3 days
|
|
|
|
|
|
| |
As C1X is close to being released, there is no need to wrap around a
feature that is already part of C90. Most of these files already use
`const' in different placed as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
typedef bool. Due to macro expansion it seemed better to use a
typedef for kernel consumers (specifically ofed won't compile
without more changes if a define is used).
- <stdbool.h> should also not re-define bool/true/false if they are
defined by <sys/types.h>. It would probably be a programming error
to define _KERNEL for user-space code, but downstream consumers
like Isilon have already been including <stdbool.h> in kernel
sources, and this protects that usage.
- sizeof(_Bool) is not necessarily the same as sizeof(int), so kernel
modules should be rebuild with this change. Bump __FreeBSD_version.
MFC after: 2 weeks
Sponsored by: Isilon Systems, LLC
|
|
|
|
|
|
|
|
| |
identifier reserved for the implementation in C99 and earlier so there is
no sensible reason for introducing yet another reserved identifier when we
could just use the one C1x uses.
Approved by: brooks (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
__noreturn macro and modify the other exiting functions to use it.
The __noreturn macro, unlike __dead2, must be used BEFORE the function.
This is in line with the C and C++ specifications that place _Noreturn (c1x)
and [[noreturn]] (C++11) in front of the functions. As with __dead2, this
macro falls back to using the GCC attribute.
Unfortunately, clang currently sets the same value for the C version macro
in C99 and C1x modes, so these functions are hidden by default. At some
point before 10.0, I need to go through the headers and clean up the C1x /
C++11 visibility.
Reviewed by: brooks (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
| |
load of _l suffixed versions of various standard library functions that use
the global locale, making them take an explicit locale parameter. Also
adds support for per-thread locales. This work was funded by the FreeBSD
Foundation.
Please test any code you have that uses the C standard locale functions!
Reviewed by: das (gdtoa changes)
Approved by: dim (mentor)
|
|
|
|
| |
Approved by: dim (mentor)
|
|
|
|
|
|
|
| |
is now. Also hide some macros in C++ mode that will break C++
namespaced calls.
Approved by: dim (mentor)
|
|
|
|
|
|
|
| |
people try to invoke the namespaced versions of the functions of the
same names.
Approved by: dim (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
implement a deprecated FPU control interface in addition to the
standard one. To make this clearer, further deprecate ieeefp.h
by not declaring the function prototypes except on architectures
that implement them already.
Currently i386 and amd64 implement the ieeefp.h interface for
compatibility, and for fp[gs]etprec(), which doesn't exist on
most other hardware. Powerpc, sparc64, and ia64 partially implement
it and probably shouldn't, and other architectures don't implement it
at all.
|