Commit Graph

3149 Commits

Author SHA1 Message Date
Sebastian Huber d8d18c3e80 ctype: Fix integer type for caseconv_entry::delta
The commit 46ba1675c4 accidently changed a
bit-field from signed to unsigned.  The caseconv_entry::delta must be a
signed integer, see also "newlib/libc/ctype/caseconv.t".

Unfortunately, a standard GCC/Newlib build is done without
-Wsign-conversion.  Using this warning option would have helped to avoid
this bug:

caseconv.t:2:22: warning: unsigned conversion from 'int' to 'unsigned int:17' changes value from '-32' to '131040' [-Wsign-conversion]
   {0x0061, 25, TOUP, -32},

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-07-30 10:47:57 +02:00
Jordi Sanfeliu 613a7f9036 Fix comparison between two character arrays
Hello,

The member 'id' in the 'utmp' struct is not a numeric but a character array,
hence the strncmp() function is needed to compare two members.
2018-07-30 09:36:49 +02:00
Yaakov Selkowitz f6417be2aa Cygwin: define _POSIX_ASYNCHRONOUS_IO
This feature is now available as of the recent AIO commits.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-07-25 10:48:55 -05:00
Sebastian Huber 46ba1675c4 ctype: Fix bitfield types on 16-bit targets
This prevents errors like this:

newlib/libc/ctype/categories.c:6:3: error: width of 'first' exceeds its type
   unsigned int first: 24;
   ^

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-07-20 14:25:03 +02:00
Sebastian Huber 916ef5fb88 RTEMS: Unconditionally define _off_t to int64_t
Exotic RTEMS targets can define this back to int32_t as an exception if
there are good reasons.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-07-20 06:53:21 +02:00
DJ Delorie edc4f87311 Remove myself from MAINTAINERS
Stepping down from target-specific maintainerships.
2018-07-19 21:32:40 -04:00
Kumar Gala 6d7e0b337c Print sign of NaN values to nano-vfprintf.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-07-17 14:41:59 +02:00
Jordi Sanfeliu ab640f4cd5 Fix to stop a fall-through in a switch statement
The following fixes a fall-through that prevented from reading the
next entry in the UTMP file and terminated the program with an abort().
2018-07-13 13:33:33 +02:00
Siddhesh Poyarekar d02cc7a09d strcmp.S: Improve performance for misaligned strings
Replace the simple byte-wise compare in the misaligned case with a
dword compare with page boundary checks in place.  For simplicity I've
chosen a 4K page boundary so that we don't have to query the actual
page size on the system.

This results in up to 3x improvement in performance in the unaligned
case on falkor and about 2.5x improvement on mustang as measured using
bench-strcmp in glibc.
2018-07-13 13:27:54 +02:00
Siddhesh Poyarekar 2d9f35c2cc memcmp.S: optimize for medium to large sizes
This improved memcmp provides a fast path for compares up to 16 bytes
and then compares 16 bytes at a time, thus optimizing loads from both
sources.  The glibc memcmp microbenchmark retains performance (with an
error of ~1ns) for smaller compare sizes and reduces up to 31% of
execution time for compares up to 4K on the APM Mustang.  On Qualcomm
Falkor this improves to almost 48%, i.e. it is almost 2x improvement
for sizes of 2K and above.
2018-07-13 13:27:54 +02:00
Siddhesh Poyarekar f44eee8f1b Improve strncmp for mutually misaligned inputs
The mutually misaligned inputs on aarch64 are compared with a simple
byte copy, which is not very efficient.  Enhance the comparison
similar to strcmp by loading a double-word at a time.  The peak
performance improvement (i.e. 4k maxlen comparisons) due to this on
the strncmp microbenchmark in glibc is as follows:

falkor: 3.5x (up to 72% time reduction)
cortex-a73: 3.5x (up to 71% time reduction)
cortex-a53: 3.5x (up to 71% time reduction)

All mutually misaligned inputs from 16 bytes maxlen onwards show
upwards of 15% improvement and there is no measurable effect on the
performance of aligned/mutually aligned inputs.
2018-07-13 13:27:54 +02:00
Szabolcs Nagy 81dc535bb9 Remove float compare option from sincosf
PREFER_FLOAT_COMPARISON setting was not correct as it could raise
spurious exceptions.  Fixing it is easy: just use ISLESS(x, y) instead
of abstop12(x) < abstop12(y) with appropriate non-signaling definition
for ISLESS.  However it seems this setting is not very useful (there is
only minor performance difference on various architectures), so remove
this option for now.
2018-07-11 17:16:04 +02:00
Szabolcs Nagy 358f3c61d6 Fix the documentation comments for log_inline in pow
There was a typo and the arguments were not explained clearly.
2018-07-11 17:16:04 +02:00
Szabolcs Nagy 138575c9b9 Fix namespace issues in sinf, cosf and sincosf
Use const sincos_t for clarity instead of making the typedef const.
Use __inv_pi4 and __sincosf_table to avoid namespace issues with
static linking.
2018-07-06 10:29:01 +02:00
Szabolcs Nagy 2805b07fa1 Fix large ulp error in pow without fma very near 1.0
The !HAVE_FAST_FMA code path split r = z/c - 1 into r = rhi + rlo such
that when z = 1-tiny and c = 1 then rlo and rhi could have much larger
magnitude than r which later caused large rounding errors.

So do a nearest rounding instead of truncation at the split.

In newlib with default settings this was observable on some arm targets
that enable the new math code but has no fma.
2018-07-06 10:29:01 +02:00
Szabolcs Nagy 6a85e1a4e5 Change the return type of converttoint and document the semantics
The roundtoint and converttoint internal functions are only called with small
values, so 32 bit result is enough for converttoint and it is a signed int
conversion so the natural return type is int32_t.

The original idea was to help the compiler keeping the result in uint64_t,
then it's clear that no sign extension is needed and there is no accidental
undefined or implementation defined signed int arithmetics.

But it turns out gcc does a good job with inlining so changing the type has
no overhead and the semantics of the conversion is less surprising this way.
Since we want to allow the asuint64 (x + 0x1.8p52) style conversion, the top
bits were never usable and the existing code ensures that only the bottom
32 bits of the conversion result are used.

In newlib with default settings only aarch64 is affected and there is no
significant code generation change with gcc after the patch.
2018-07-06 10:29:01 +02:00
Szabolcs Nagy 73a3e95ff2 Remove unused TOINT_RINT and TOINT_SHIFT macros
Only have separate code paths for TOINT_INTRINSICS and !TOINT_INTRINSICS.
2018-07-06 10:29:01 +02:00
Szabolcs Nagy 393a1cb4ea Move __HAVE_FAST_FMA to math_config.h
Define it consistently with other HAVE_* macros that only affect code
using math_config.h.  This is also closer to the Arm Optimized Routines
code.
2018-07-06 10:29:01 +02:00
Szabolcs Nagy cbe50607fb Fix code style and comments of new math code
Synchronize code style and comments with Arm Optimized Routines, there
are no code changes in this patch.  This ensures different projects using
the same code have consistent code style so bug fix patches can be applied
more easily.
2018-07-06 10:29:01 +02:00
Takashi Yano 6a3e08a53e Fix newlib functions perror()/psignal() not to use writev().
This fix is for some platforms which do not have writev().
*perror.c: Use _write_r() instead of writev().
*psignal.c: Use write() insetad of writev().

Revise commit: d4f4e7ae1b
2018-07-05 15:33:49 -04:00
Takashi Yano d4f4e7ae1b Fix a bug of perror()/psignal() that changes the orientation of stderr.
* perror.c: Fix the problem that perror() changes the orientation
  of stderr to byte-oriented mode if stderr is not oriented yet.
* psignal.c: Ditto.
2018-07-04 14:17:28 +02:00
Corinna Vinschen 006520ca2b newlib: enable new math functions on Cygwin
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-06-27 15:53:51 +02:00
Szabolcs Nagy b99d49e506 New pow implementation
The new implementation is provided under !__OBSOLETE_MATH, it uses
ISO C99 code.  With default settings the worst case error in nearest
rounding mode is 0.54 ULP with inlined fma and fma contraction.  It uses
a 4 KB lookup table in addition to the table in exp_data.c, on aarch64
.text+.rodata size of libm.a is increased by 2295 bytes.

Improvements on Cortex-A72:
latency: 3.3x
thruput: 4.9x
2018-06-27 15:40:49 +02:00
Szabolcs Nagy 07e2c32828 New log2 implementation
The new implementation is provided under !__OBSOLETE_MATH, it uses
ISO C99 code.  With default settings the worst case error in nearest
rounding mode is 0.547 ULP with inlined fma and fma contraction.  It uses
a 1 KB lookup table, on aarch64 .text+.rodata size of libm.a is increased
by 1584 bytes.

Note that the math.h header defines log2(x) to be log(x)/Ln2, this is
not changed, so the new code is only used if that macro is suppressed.

Improvements on Cortex-A72:
latency: 2.0x
thruput: 2.2x
2018-06-27 15:40:49 +02:00
Szabolcs Nagy e5791079c6 New log implementation
The new implementations are provided under !__OBSOLETE_MATH, it uses
ISO C99 code.  With default settings the worst case error in nearest
rounding mode is 0.519 ULP with inlined fma and fma contraction.  It uses
a 2 KB lookup table, on aarch64 .text+.rodata size of libm.a is increased
by 1703 bytes.  The w_log.c wrapper is disabled since error handling is
inline in the new code.

New __HAVE_FAST_FMA and __HAVE_FAST_FMA_DEFAULT feature macros were
added to enable selecting between the code path that uses fma and the
one that does not.  Targets supposed to set __HAVE_FAST_FMA_DEFAULT
if they have single instruction fma and the compiler can actually
inline it (gcc has __FP_FAST_FMA macro but that does not guarantee
inlining with -fno-builtin-fma).

Improvements on Cortex-A72:
latency: 1.9x
thruput: 2.3x
2018-06-27 15:40:49 +02:00
Szabolcs Nagy fb929067db New exp and exp2 implementations
The new implementations are provided under !__OBSOLETE_MATH, they use
ISO C99 code.  There are several settings, with the default one the
worst case error in nearest rounding mode is 0.509 ULP for exp and
0.507 ULP for exp2 when a multiply and add is contracted into an fma.
They use a shared 2 KB lookup table, on aarch64 .text+.rodata size
of libm.a is increased by 1868 bytes.  The w_*.c wrappers are disabled
for the new code as it takes care of error handling inline.

The old exp2(x) code used to be just pow(2,x) so the speedup there
is more significant.

The file name has no special prefix to avoid any name collision with
existing files.

Improvements on Cortex-A72:
exp latency: 3.2x
exp thruput: 4.1x
exp2 latency: 7.8x
exp2 thruput: 18.8x
2018-06-27 15:40:49 +02:00
Szabolcs Nagy cfbcbd1c95 Use uint32_t sign argument to math error functions
This change is equivalent to the commit
c65db17340
and only affects code that is from the Arm optimized-routines project.

It does not affect the observable behaviour, but the code generation
can be different on 64bit targets.  The intention is to make the
portable semantics of the code obvious by using a fixed size type.
2018-06-27 15:40:49 +02:00
Takashi Yano 048490485a Fix Unicode table.
* (mkcategories): Fix a bug that outputs incorrect Unicode category
  table for code point ranges.
* (categories.t): Rebuild it using the bug-fixed mkcategories.

This fixes the problem reported in the following post.
https://cygwin.com/ml/cygwin/2018-06/msg00248.html
2018-06-26 10:19:12 +02:00
Corinna Vinschen b14daac482 Revert "Remove -fno-builtin to allow gcc to inline functions such as fabs, floor, creal, imag."
This reverts commit c077b9de99.

Yet another accidental commit...
2018-06-26 10:17:04 +02:00
Jon Beniston c077b9de99 Remove -fno-builtin to allow gcc to inline functions such as fabs, floor, creal, imag. 2018-06-25 13:31:51 +02:00
Wilco Dijkstra 3baadb9912 Improve performance of sinf/cosf/sincosf
Here is the correct patch with both filenames and int cast fixed:

This patch is a complete rewrite of sinf, cosf and sincosf.  The new version
is significantly faster, as well as simple and accurate.
The worst-case ULP is 0.56072, maximum relative error is 0.5303p-23 over all
4 billion inputs.  In non-nearest rounding modes the error is 1ULP.

The algorithm uses 3 main cases: small inputs which don't need argument
reduction, small inputs which need a simple range reduction and large inputs
requiring complex range reduction.  The code uses approximate integer
comparisons to quickly decide between these cases - on some targets this may
be slow, so this can be configured to use floating point comparisons.

The small range reducer uses a single reduction step to handle values up to
120.0.  It is fastest on targets which support inlined round instructions.

The large range reducer uses integer arithmetic for simplicity.  It does a
32x96 bit multiply to compute a 64-bit modulo result.  This is more than
accurate enough to handle the worst-case cancellation for values close to
an integer multiple of PI/4.  It could be further optimized, however it is
already much faster than necessary.

Simple benchmark showing speedup factor on AArch64 for various ranges:

range	0.7853982	sinf	1.7	cosf	2.2	sincosf	2.8
range	1.570796	sinf	1.9	cosf	1.9	sincosf	2.7
range	3.141593	sinf	2.0	cosf	2.0	sincosf	3.5
range	6.283185	sinf	2.3	cosf	2.3	sincosf	4.2
range	125.6637	sinf	2.9	cosf	3.0	sincosf	5.1
range	1.1259e15	sinf	26.8	cosf	26.8	sincosf	45.2

ChangeLog:
2018-05-18  Wilco Dijkstra  <wdijkstr@arm.com>

        * newlib/libm/common/Makefile.in: Regenerated.
        * newlib/libm/common/Makefile.am: Add sinf.c, cosf.c, sincosf.c
        sincosf.h, sincosf_data.c. Add -fbuiltin -fno-math-errno to CFLAGS.
        * newlib/libm/common/math_config.h: Add HAVE_FAST_ROUND, HAVE_FAST_LROUND,
        roundtoint, converttoint, force_eval_float, force_eval_double, eval_as_float,
        eval_as_double, likely, unlikely.
        * newlib/libm/common/cosf.c: New file.
        * newlib/libm/common/sinf.c: Likewise.
        * newlib/libm/common/sincosf.h: Likewise.
        * newlib/libm/common/sincosf.c: Likewise.
        * newlib/libm/common/sincosf_data.c: Likewise.
        * newlib/libm/math/sf_cos.c: Add #if to build conditionally.
        * newlib/libm/math/sf_sin.c: Likewise.
        * newlib/libm/math/wf_sincos.c: Likewise.

--
2018-06-21 09:37:04 +02:00
Corinna Vinschen cfe8c6c504 Revert "Improve performance of sinf/cosf/sincosf"
This reverts commit fca80a9d1b.

Accidentally pushed a preliminary version
2018-06-21 09:36:39 +02:00
Jon Beniston b7d9d27b0e libm/common/s_round.c (round): Add cast for 16-bit CPUs 2018-06-21 09:31:13 +02:00
Wilco Dijkstra fca80a9d1b Improve performance of sinf/cosf/sincosf
This patch is a complete rewrite of sinf, cosf and sincosf.  The new version
is significantly faster, as well as simple and accurate.
The worst-case ULP is 0.56072, maximum relative error is 0.5303p-23 over all
4 billion inputs.  In non-nearest rounding modes the error is 1ULP.

The algorithm uses 3 main cases: small inputs which don't need argument
reduction, small inputs which need a simple range reduction and large inputs
requiring complex range reduction.  The code uses approximate integer
comparisons to quickly decide between these cases - on some targets this may
be slow, so this can be configured to use floating point comparisons.

The small range reducer uses a single reduction step to handle values up to
120.0.  It is fastest on targets which support inlined round instructions.

The large range reducer uses integer arithmetic for simplicity.  It does a
32x96 bit multiply to compute a 64-bit modulo result.  This is more than
accurate enough to handle the worst-case cancellation for values close to
an integer multiple of PI/4.  It could be further optimized, however it is
already much faster than necessary.

Simple benchmark showing speedup factor on AArch64 for various ranges:

range	0.7853982	sinf	1.7	cosf	2.2	sincosf	2.8
range	1.570796	sinf	1.9	cosf	1.9	sincosf	2.7
range	3.141593	sinf	2.0	cosf	2.0	sincosf	3.5
range	6.283185	sinf	2.3	cosf	2.3	sincosf	4.2
range	125.6637	sinf	2.9	cosf	3.0	sincosf	5.1
range	1.1259e15	sinf	26.8	cosf	26.8	sincosf	45.2

ChangeLog:
2018-06-18  Wilco Dijkstra  <wdijkstr@arm.com>

        * newlib/libm/common/Makefile.in: Regenerated.
        * newlib/libm/common/Makefile.am: Add sinf.c, cosf.c, sincosf.c
        sincosf.h, sincosf_data.c. Add -fbuiltin -fno-math-errno to CFLAGS.
        * newlib/libm/common/math_config.h: Add HAVE_FAST_ROUND, HAVE_FAST_LROUND,
        roundtoint, converttoint, force_eval_float, force_eval_double, eval_as_float,
        eval_as_double, likely, unlikely.
        * newlib/libm/common/cosf.c: New file.
        * newlib/libm/common/sinf.c: Likewise.
        * newlib/libm/common/sincosf.h: Likewise.
        * newlib/libm/common/sincosf.c: Likewise.
        * newlib/libm/common/sincosf_data.c: Likewise.
        * newlib/libm/math/sf_cos.c: Add #if to build conditionally.
        * newlib/libm/math/sf_sin.c: Likewise.
        * newlib/libm/math/wf_sincos.c: Likewise.

--
2018-06-19 09:44:28 +02:00
Thomas Kindler 9dd3c3b0ad newlib: getopt now permutes multi-flag options correctly
Previously, "test 1 2 3 -a -b -c"  was permuted to "test -a -b -c 1 2 3",
but "test 1 2 3 -abc" was left as "test 1 2 3 -abc".

Signed-off-by: Thomas Kindler <mail+newlib@t-kindler.de>
2018-06-18 18:45:44 +02:00
Jeff Johnston 4a3d0a5a5d Fix issue with malloc_extend_top
- when calculating a correction to align next brk to page boundary,
  ensure that the correction is less than a page size
- if allocating the correction fails, ensure that the top size is
  set to brk + sbrk_size (minus any front alignment made)

Signed-off-by: Jeff Johnston <jjohnstn@redhat.com>
2018-05-29 10:16:48 -04:00
Matthias Kannwischer fcfea0ae2d fix llrint and lrint for 52 <= exponent <= 62 2018-05-29 15:59:48 +02:00
Freddie Chopin 3305f35570 Fix 32-bit overflow in mktime() when time_t is 64-bits long
When converting number of days since epoch (32-bits) to seconds,
calculations using 32-bit `long` overflow for years above 2038. Solve
this by casting number of days to `time_t` just before final
multiplication.

Signed-off-by: Freddie Chopin <freddie.chopin@gmail.com>
2018-05-29 15:27:03 +02:00
Jeff Johnston e928275566 Use _LDBL_EQ_DBL in nexttowardf.c
2018-05-07  Tom de Vries  <tom@codesourcery.com>

	* libm/common/nexttowardf.c: Use _LDBL_EQ_DBL instead of
	_LDBL_EQ_DOUBLE.
2018-05-07 12:22:12 -04:00
Jeff Johnston cd31fbb2ae Add nvptx port.
- From: Cesar Philippidis <cesar@codesourcery.com>
  Date: Tue, 10 Apr 2018 14:43:42 -0700
  Subject: [PATCH] nvptx port

  This port adds support for Nvidia GPU's, which are primarily used as
  offload accelerators in OpenACC and OpenMP.
2018-04-13 15:42:37 -04:00
Corinna Vinschen 27652b608d strtod: Convert 64 bit double to 64 bit int during computation
The gdtoa implementation uses the type long, defined as Long, in lots
of code.  For historical reason newlib defines Long as int32_t instead.

This works fine, as long as floating point exceptions are not enabled.
The conversion to 32 bit int can lead to a FE_INVALID situation.

Example:

  const char *str = "121645100408832000.0";
  char *ptr;

  feenableexcept (FE_INVALID);
  strtod (str, &ptr);

This leads to the following situation in strtod

  double aadj;
  Long L;

  [...]
  L = (Long)aadj;

For instance, on x86_64 the code here is

  cvttsd2si %xmm0,%eax

At this point, aadj is 2529648000.0 in our example.  The conversion to
32 bit %eax results in a negative int value, thus the conversion is
invalid.  With feenableexcept (FE_INVALID), a SIGFPE is raised.

Fix this by always using 64 bit ints here if double is not a 32 bit type
to avoid this type of FP exceptions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-04-09 11:31:04 +02:00
Corinna Vinschen 1ee6654e50 newlib: fix iswupper_l in !_MB_CAPABLE case
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-27 12:35:27 +02:00
Thomas Wolff fc59da00c8 comments to document struct caseconv_entry
explain design of compact (packed) struct caseconv_entry,
in case it needs to be modified for future Unicode versions
2018-03-26 12:01:50 +02:00
Thomas Wolff b49ce5af1b newlib: fix indentation in toulower
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-26 10:00:16 +02:00
Hakan Lindqvist 3ce38df8d1 Reduce qsort stack consumption
Classical function call recursion wastes a lot of stack space.
Each recursion level requires a full stack frame comprising all
local variables and additional space as dictated by the
processor calling convention.

This implementation instead stores the variables that are unique
for each recursion level in a parameter stack array, and uses
iteration to emulate recursion. Function call recursion is not
used until the array is full.

To ensure the stack consumption isn't worsened by this design, the
size of the parameter stack array is chosen to be similar to the
stack frame excluding the array. Each function call recursion level
can handle 8 iterative recursion levels.

Stack consumption will worsen when sorting tiny arrays that do not
need recursion (of 6 elements or less). It will be about equal for
up to 15 elements, and be an improvement for larger arrays. The best
case improvement is a stack size reduction down to about one quarter
of the stack consumption before the change.

A design where the parameter stack array is large enough for the
worst case recursion level was rejected because it would worsen
the stack consumption when sorting arrays smaller than about 1500
elements. The worst case is 31 levels on a 32-bit system.

A design with a dynamic parameter array size was rejected because
of limitations in some compilers.
2018-03-16 10:21:23 +01:00
Hakan Lindqvist 0045445ad6 Ensure qsort recursion depth is bounded
The qsort algorithm splits the input array in three parts. The
left and right parts may need further sorting. One of them is
sorted by recursion, the other by iteration. This update ensures
that it is the smaller part that is chosen for recursion.

By choosing the smaller part, each recursion level will handle
less than half the array of the previous recursion level. Hence
the recursion depth is bounded to be less than log2(n) i.e. 1
level per significant bit in the array size n.

The update also includes code comments explaining the algorithm.
2018-03-16 10:21:23 +01:00
Joel Sherrill 948db3e4b7 Correct prototypes of pthread_mutex_getprioceiling() and pthread_setschedparam() 2018-03-15 09:25:45 -05:00
Richard Earnshaw 0bb8697333 [arm] Fix syscalls.c for newlib embedded syscalls builds
Newlib has a build configuration where syscalls can be directly
embedded in the newlib library rather than relying on libgloss.

This configuration was broken recently by an update to the libgloss
support for Arm that was not propagated to the syscalls interface in
newlib itself.  This patch restores the build.  It's essentially a
copy of https://sourceware.org/ml/newlib/2018/msg00128.html but there
are some other minor cleanups and changes that I've made at the same
time.  None of those cleanups affect functionality.

The prototypes of the following functions have been updated: _link,
_sbrk, _getpid, _write, _swiwrite, _lseek, _swilseek, _read and
_swiread.

Signed-off-by: Richard Earnshaw <Richard.Earnshaw@arm.com>
2018-03-15 09:55:11 +00:00
Yaakov Selkowitz 829820af6e ssp: fix wchar.h with -std=c99
https://sourceware.org/ml/newlib/2018/msg00261.html

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-03-14 10:46:32 -05:00
Yaakov Selkowitz e494b56035 Fix alloc_align and alloc_size macros for multiple arguments
https://sourceware.org/ml/newlib/2018/msg00263.html

This is a follow-up to commit 4564b30f33.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-03-14 10:17:51 -05:00
Corinna Vinschen 134f93f313 ctype: align size of category bit fields to small targets needs
E.g. arm ABI requires -fshort-enums for bare-metal toolchains.
Given there are only 29 category enums, the compiler chooses an
8 bit enum type, so a size of 11 bits for the bitfield leads to
a compile time error:

  error: width of 'cat' exceeds its type
    enum category cat: 11;
                  ^~~

Fix this by aligning the size of the category members to byte
borders.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-14 11:38:24 +01:00
Corinna Vinschen edcf783dc2 Revert "ctype: align size of category bit fields to small targets needs"
This reverts commit e98d3eb3eb.

It has accidentally included some work in progress.
2018-03-14 11:36:06 +01:00
Thomas Wolff 44d90834fb fix/enhance Unicode table generation scripts
Scripts do not try to acquire Unicode data by best-effort magic anymore.
Options supported:
-h for help
-i to copy Unicode data from /usr/share/unicode/ucd first
-u to download Unicode data from unicode.org first
If (despite of -i or -u if given) the necessary Unicode files are not
available locally, table generation is skipped, but no error code is
returned, so not to obstruct the build process if called from a Makefile.
2018-03-14 10:44:32 +01:00
Corinna Vinschen e98d3eb3eb ctype: align size of category bit fields to small targets needs
E.g. arm ABI requires -fshort-enums for bare-metal toolchains.
Given there are only 29 category enums, the compiler chooses an
8 bit enum type, so a size of 11 bits for the bitfield leads to
a compile time error:

  error: width of 'cat' exceeds its type
    enum category cat: 11;
                  ^~~

Fix this by aligning the size of the category members to byte
borders.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-14 10:36:38 +01:00
Corinna Vinschen e186dc8661 towctrans_l: Always return a value from helper functions
touupper and toulower didn't return a value in all cases.  Worse,
this only broke Cygwin when building without optimization for debug
purposes.

Why GCC neglects to notice this is a mystery.

While at it, fix formatting.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-03-13 22:09:30 +01:00
Joel Sherrill 5b97e36239 rtems/.../dirent.h: Add alphasort() prototype 2018-03-13 09:11:47 -05:00
Jon Turney 4564b30f33 Correct alloc_size annotation on reallocarray()
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2018-03-13 09:04:56 -05:00
Thomas Wolff c8d96a96ea make target for explicit Unicode data tables generation
Run 'make unidata' in newlib target directory to generate Unicode
data tables for libc functions wcwidth, tow* and isw*.
2018-03-12 12:09:44 +01:00
Thomas Wolff a352730004 character data generation 2018-03-12 11:39:50 +01:00
Thomas Wolff 41f72ab4d7 use generated character data
The tow* functions use an included case conversion table which can be
generated from Unicode data.
The isw* functions use a character categories table (provided by
categories.c) which can be generated from Unicode data.
Delegation between current-locale and specific-locale-dependent functions
was reverted towards the generic locale-dependent functions (*_l.c);
this is however only relevant on systems with non-Unicode wide character
locales, thus not on Cygwin.
2018-03-12 11:39:42 +01:00
Thomas Wolff 3ccfb407af generated character category data, Unicode 10.0
Table categories.t and tag enumeration categories.cat provide
character class data for most of the isw* functions.
These data are generated from Unicode data.
2018-03-12 11:09:31 +01:00
Thomas Wolff 402daa2f80 generated case conversion data, Unicode 10.0
Table caseconv.t provides case conversion data for the tow* functions,
especially towupper and towlower.
These data are generated from Unicode data.
2018-03-12 11:09:31 +01:00
Thomas Wolff 37132125bc width data generation 2018-03-12 10:17:20 +01:00
Thomas Wolff 8e8fd6c849 use generated width data 2018-03-12 10:17:20 +01:00
Thomas Wolff 71291047e2 generated width data, Unicode 10.0
These tables provide character width properties for use by the
wcwidth/wcswidth functions. They are generated from Unicode.
2018-03-12 10:17:20 +01:00
Sebastian Huber f641474cb2 RTEMS: Use int for _CLOCKID_T_
Linux and FreeBSD use int as well.  In addition, this fixes an Ada
incompatiblity problem on 64-bit targets.  See also GCC:

  gcc/ada/libgnarl/s-osinte__rtems.ads

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-03-06 11:40:16 +01:00
Sebastian Huber a9c8434527 Make _CLOCKID_T_ system configurable
Let systems optionally provide the _CLOCKID_T_ type via
<machine/_types.h>.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-03-06 11:40:16 +01:00
Thomas Wolff f92f048528 Locale modifier @cjkwide to adjust ambiguous-width in non-CJK locales
Locale modifier @cjkwide makes Unicode "ambiguous width" characters
wide.  So ambiguous width characters can be enforced to have width 2
even in non-CJK locales. This gives e.g. users of "Powerline symbols"
the opportunity to adjust their width to the desired behaviour (and the
behaviour apparently expected by some tools) without having to set a CJK
locale and without losing consistence of terminal character width with
wcwidth/wcswidth locale width.
2018-03-05 17:15:12 +01:00
Our Air Quality b7520b14d5 Add global stdio streams support for reent small. 2018-03-01 18:05:31 -05:00
Jaap de Wolff 8329f4867b add forward declaration to __cxa_atexit to aeabi_atexit, to prevent warnings 2018-02-16 12:16:07 +01:00
Jaap de Wolff 337cee51ca Add prototype to _malloc_lock() and *unlock() to malloc.h, and inlude this from nano-mallocr.c 2018-02-16 12:16:07 +01:00
Jaap de Wolff fdc5f52808 Add define _COMPILING_NEWLIB for arm to configure.host, as it is obviously needed
Signed-off-by: Jaap de Wolff <jaap@stretch.de-wolff.org>
2018-02-16 12:16:07 +01:00
Corinna Vinschen 4c73ad6b20 newlib: drop Cygwin license from sys/select.h
This license was accidentally retained when moving the file from Cygwin to newlib.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-02-02 11:27:58 +01:00
Jon Beniston b8272e3b8d Fix vprintf and vfscanf for GCC PR 14577 2018-02-01 13:28:28 +01:00
Sebastian Huber 1658a57715 epiphany: Additional setjmp() and longjmp() syms
At least with Binutils 2.30 and GCC 7.3 we need symbol definitions
without the leading underscore.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2018-01-31 08:17:19 +01:00
Yaakov Selkowitz b920561fe3 ssp: do not use __ssp_protected_ symbol prefixes
This is a NetBSD-specific detail which does not apply to Newlib, causing
linking issues in certain scenarios:

https://cygwin.com/ml/cygwin/2018-01/msg00189.html

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-26 11:51:15 -06:00
Thomas Preudhomme 7d09d0e261 Disable powf/log2?f/exp2?f optimization for single-precision Arm FPU
New optimized powf, logf, log2f, expf and exp2f yield worse performance
on Arm targets with only single precision instructions because the
double precision arithmetic is then implemented via softfloat routines.
This patch uses the old implementation when double precision
instructions are not available on Arm targets.

Testing: Built newlib with GCC's rmprofile Arm multilibs and compared
before/after -> only the above functions are changed and calls to them
(name change from logf to __ieee754_logf and similar). Testing the
changed function on a panel of values yields the same result before the
original patches to improve them and after this one. Double checking the
performance by looping the same panel of values being tested on Arm
Cortex-M4 does show the performance regression is fixed.
2018-01-25 16:08:35 +01:00
Yaakov Selkowitz bd62f539de Guard langinfo.h nl_item from multiple typedefs
This is a prerequisite of adding nl_types.h support to Cygwin.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-19 13:19:21 -06:00
Orlando Arias b7e0f286a2 Fix syntax error in exit.c
This patch fixes a syntax error in exit.c that was introduced during the
ANSI-fication of newlib. The patch fixes a compile-time issue that arises when
newlib is configured with the --enable-lite-exit feature.
2018-01-19 19:58:10 +01:00
Jeff Johnston fffd2770db Bump release to 3.0.0 for yearly snapshot
- major release required due to removal of K&R support
2018-01-18 13:07:45 -05:00
Kito Cheng cba678ba02 RISC-V: Fix alignment issue in sigjmp_buf 2018-01-18 09:21:10 +01:00
Yaakov Selkowitz 4cd1905add ansification: remove ansidecl.h from makedoc
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:33 -06:00
Yaakov Selkowitz 7bfa24c495 ansification: fix makedoc for ANSI C
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:32 -06:00
Yaakov Selkowitz 7192f84096 ansification: remove _HAVE_STDC
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:30 -06:00
Yaakov Selkowitz 70ee6b17df ansification: remove _EXFUN, _EXFUN_NOTHROW
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:29 -06:00
Yaakov Selkowitz 77f16db546 ansification: remove _EXFNPTR, _EXPARM
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:27 -06:00
Yaakov Selkowitz 9087163804 ansification: remove _DEFUN
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:26 -06:00
Yaakov Selkowitz 44276afe2a ansification: remove _VOLATILE, _SIGNED
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:21 -06:00
Yaakov Selkowitz 67ee0cac4c ansification: remove _VOID
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:20 -06:00
Yaakov Selkowitz fff27f8429 ansification: remove _DEFUN_VOID
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:19 -06:00
Yaakov Selkowitz 670b01da7f ansification: remove _CAST_VOID
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:17 -06:00
Yaakov Selkowitz e6321aa6a6 ansification: remove _PTR
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:16 -06:00
Yaakov Selkowitz 0403b9c8c4 ansification: remove _VOID_PTR
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:14 -06:00
Yaakov Selkowitz eea249da3b ansification: remove _PARAMS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:13 -06:00
Yaakov Selkowitz e13e191b60 ansification: remove _NOARGS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:11 -06:00
Yaakov Selkowitz 2310096fbc ansification: remove _DOTS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:10 -06:00
Yaakov Selkowitz 0bda30e1ff ansification: remove _CONST
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:08 -06:00
Yaakov Selkowitz 6783860a2e ansification: remove _AND
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:05 -06:00
Yaakov Selkowitz 82339fcd71 Make __always_inline macro compatible with glibc
For example, this is used when cross-compiling the Linux kernel on Cygwin.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-16 13:24:42 -06:00
Yaakov Selkowitz 2cb24159fb cygwin: add LFS_CFLAGS etc. to confstr/getconf
These are used, for instance, when cross-compiling the Linux kernel.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-16 12:12:45 -06:00
Giacomo Tesio 1a528f159d jehanne: add support for O_NONBLOCK 2018-01-15 00:41:32 +01:00
Ivan Grokhotkov 1d01586b62 newlib: fvprintf: fix get_arg for !_MB_CAPABLE
Code path for _MB_CAPABLE scans for the '%' character and advances
'fmt' pointer past '%'. Code path for !_MB_CAPABLE leaved fmt pointing
to '%', which caused the state machine to go from START to DONE state
immediately.
2018-01-09 09:52:18 +01:00
Alexander Fedotov fcd33916ac fix incompatible pointer type for va_list in nano versions of printf and scanf for target like PowerPC 2018-01-08 11:05:05 +01:00
Jim Wilson a6633677b9 RISC-V: Add nanosleep functionality 2017-12-26 12:24:45 -08:00
Giacomo Tesio b8c22a1bf6 jehanne: remove unused headers 2017-12-24 13:14:52 +01:00
Giacomo Tesio 881e62f153 jehanne: define pid_t in termios.h 2017-12-23 01:23:04 +01:00
Giacomo Tesio b30b77d55a jehanne: mv sys/termios.h include/termios.h 2017-12-22 00:55:16 +01:00
Giacomo Tesio 15360a2bf8 jehanne: fix build (ioctl) 2017-12-22 00:25:37 +01:00
Giacomo Tesio 4fa1ec95ac jehanne: draft ioctl handling of TIOCGWINSZ and TIOCSWINSZ 2017-12-22 00:04:13 +01:00
Corinna Vinschen 6e5b39940a newlib: ftello{64}: Handle appending stream without fflushing
Neither upstream FreeBSD nor glibc ever call fflush from ftell
and friends.  In border cases it has the tendency to return
wrong or unexpected values, for instance on block devices.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-18 20:17:51 +01:00
Corinna Vinschen dc2d175721 newlib: ftello{64}: Fix type of returned value
Especially don't just use -1L since _off_t/_off64_t are not
guaranteed to be of type long.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-18 20:15:27 +01:00
Martin Aberg 1251555311 newlib: Availability of _kill() in sys/signal.h
Make prototype of _kill() always visible when _COMPILING_NEWLIB is
defined. This makes <sys/signal.h> consistent with the use of
_COMPILING_NEWLIB in <sys/unistd.h>, <sys/times.h>, etc.
2017-12-18 19:58:05 +01:00
Giacomo Tesio 5d3bb3fd38 jehanne: default_error_translator for POSIX_execve returns PosixEPERM 2017-12-14 00:05:34 +01:00
Jim Wilson c874f1145f newlib: Don't do double divide in powf.
* Use 0.0f instead of 0.0 in divide.
2017-12-13 11:33:19 +01:00
Jim Wilson c338bc2255 Don't call double rint from float powf.
Updated patch to use 0.0f in addition to calling rintf.

Tested same way as before, with a testcase that triggers the code and
make check.

OK?

	newlib/
	* libm/math/wf_pow.c (powf): Call rintf instead of rint.  Use 0.0f
	for compare.
2017-12-13 11:03:10 +01:00
Jim Wilson efce18d754 Update MAINTAINERS file email address.
To update my email address to my current employer.  Specifix died quite a while
ago, and I've had two jobs in the interim.

	newlib/
	* MAINTAINERS: Update my email address.
2017-12-12 13:50:30 +01:00
Jon Turney 2ce4e1e5ad makedoc: warn about some obsolete and deprecated commands
To follow up the thread starting at [1], since all uses of TRAD_SYNOPSIS
have been removed, and all uses of ANSI_SYNOPSIS have been renamed to
SYNOPSIS, we can now warn about the use of these.

[1] https://sourceware.org/ml/newlib/2017/msg01182.html

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-12-08 12:09:03 +00:00
Jon Turney 06bd0ecc8d makedoc: exit with non-zero status on error
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-12-07 11:54:57 +00:00
Jon Turney c006fd459f makedoc: make errors visible
Discard QUICKREF sections, rather than writing them to stderr
Discard MATHREF sections, rather than discarding as an error
Pass NOTES sections through to texinfo, rather than discarding as an error
Don't redirect makedoc stderr to .ref file
Remove makedoc output on error
Remove .ref files from CLEANFILES
Regenerate Makefile.ins

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-12-07 11:54:11 +00:00
Corinna Vinschen 67e628fa33 newlib: vfwscanf: fix negation bug in %[ conversion
Old BSD bug:  While ^ is recognized and the set of matching characters
is negated, the code neglects to increment the pointer pointing to the
matching characters.  Thus, on a negation expression like %[^xyz], the
matching doesn't only stop at x, y, or z, but incorrectly also on ^.

Fix this by setting the start pointer after recognizing the ^.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-04 17:05:11 +01:00
Yaakov Selkowitz 8f7c712bb8 ssp: add Object Size Checking for wchar.h, part 1
The following functions are also guarded in glibc:
fwprintf, swprintf, wprintf, vfwprintf, vswprintf, vwprintf.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-04 04:09:46 -06:00
Corinna Vinschen b7b6b42cd4 newlib: vfscanf: Implement %l[
Just as %lc and %ls, this is only enabled on ELIX_LEVEL >= 2.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-01 17:53:59 +01:00
Corinna Vinschen a49209d2bc newlib: vf[w]scanf: Fix conversion multibyte <-> wchar_t
* vfscanf: per POSIX, if the target type is wchar_t, the width is
  counted in (multibyte) characters, not in bytes.

* vfscanf: Handle UTF-8 multibyte sequences converted to surrogate
  pairs on UTF-16 systems.

* vfwscanf: Don't count high surrogates in input against field width
  counting.  Per POSIX, input is

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-01 17:18:26 +01:00
Corinna Vinschen 9638c07527 newlib: vf[w]scanf: Drop width computation mixup
The width value keeps the maximum field width.  This is the maximum
field width of the *input*.  It's *never* to be used in conjunction
with the number of bytes or characters written to the output argument.

However, especially in vfwscanf, the code is partially taken from
NetBSD which erroneously subtracts the number of multibyte chars
written to the argument from the width variable, thus potentially
subtracting up to MB_CUR_MAX from width for a single character in
the input stream.

To make matters worse, the previous patch adding %m added basically
the same mistake for 'c' type input.

Fix it.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-12-01 13:47:26 +01:00
Yaakov Selkowitz 70afa0c7b3 HOWTO: remove reference to TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:54 -06:00
Yaakov Selkowitz 9f369d3c8d mathfp: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:54 -06:00
Yaakov Selkowitz ec4c079f4b math: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:53 -06:00
Yaakov Selkowitz 59822e777f libm/machine: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:53 -06:00
Yaakov Selkowitz ac8b60bdd1 complex: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:53 -06:00
Yaakov Selkowitz 3312f960a7 libm/common: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:53 -06:00
Yaakov Selkowitz 571ff42ae4 unix: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:53 -06:00
Yaakov Selkowitz 5aa2434de0 time: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:53 -06:00
Yaakov Selkowitz adfde9d773 sys: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:52 -06:00
Yaakov Selkowitz 352c8f2f0d string: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:52 -06:00
Yaakov Selkowitz a38fc79ee9 stdlib: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:52 -06:00
Yaakov Selkowitz a60026253d stdio64: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:51 -06:00
Yaakov Selkowitz c7ef9668cf stdio: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:51 -06:00
Yaakov Selkowitz b88cfbc1e5 signal: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:51 -06:00
Yaakov Selkowitz bf3a554bc6 search: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:51 -06:00
Yaakov Selkowitz 35d2d2fe2e reent: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:51 -06:00
Yaakov Selkowitz aa06fa01dc posix: remove TRAD_SYNOPSIS 2017-12-01 03:41:50 -06:00
Yaakov Selkowitz 191b4f35bc misc: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:50 -06:00
Yaakov Selkowitz 1f1e477554 powerpc: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:50 -06:00
Yaakov Selkowitz ddd22ee069 nds32: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:50 -06:00
Yaakov Selkowitz 4e8c64b928 microblaze: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:50 -06:00
Yaakov Selkowitz 59235deeec locale: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:50 -06:00
Yaakov Selkowitz 03973c19e9 iconv: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:50 -06:00
Yaakov Selkowitz 9db7609592 ctype: remove TRAD_SYNOPSIS
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:50 -06:00
Yaakov Selkowitz 8ba0bbb913 ssp: add Object Size Checking for unistd.h, part 2
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:49 -06:00
Corinna Vinschen d43863f569 newlib: vf[w]scanf: Implement POSIX %m modifier
* The new code is guarded with _WANT_IO_POSIX_EXTENSIONS, but
  this is automatically enabled with _WANT_IO_C99_FORMATS for now.

* vfscanf neglects to implement %l[, so %ml[ is not implemented yet
  either.

* Sidenote: vfwscanf doesn't allow ranges in %[ yet.  Strictly this
  is allowed per POSIX, but it differes from vfscanf as well as from
  glibc.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30 21:50:23 +01:00
Corinna Vinschen 7161622514 newlib: vfwscanf: fix miscomputation of max field width in %[] case
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30 21:02:38 +01:00
Yaakov Selkowitz b9a662bb4c Feature test macros overhaul: unistd.h, part 3
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30 12:09:05 -06:00
Yaakov Selkowitz 1e43e181c2 ssp: add Object Size Checking for stdlib.h
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30 12:09:03 -06:00
Corinna Vinschen 0fd2c9bd12 newlib: vf[w]scanf: add validity checks
POSIX requires that directive characters appear in a certain sequence:

1. '%' or '%<n>$'
2. optional '*'
3. optional field width digits
4. optional 'm' (not yet implemented)
5. optional length modifier ('l', 'L', 'll', 'h', 'hh', 'j', 't', 'z')
6. conversion specifier ('d', 's', etc)

Add a few basic validity checks to that effect, otherwise reject
directive as match failure.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30 11:55:27 +01:00
Corinna Vinschen 31f11d0572 newlib: vf[w]scanf: Use SIZE_MAX rather than ~0
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30 11:41:36 +01:00
Corinna Vinschen 5e4a1c9c97 newlib: vfscanf: fix formatting
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30 11:41:36 +01:00
Corinna Vinschen 2e328edee4 newlib: vf[w]scanf: Only return from a single point to simplify cleanup
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-30 11:41:36 +01:00
Yaakov Selkowitz 8a94bca694 string: add wmempcpy
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-30 04:06:49 -06:00
Sebastian Huber dadc9e7e4a RTEMS: Add semaphore <sys/lock.h> functions
Declare semaphore try wait and post binary functions.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-30 07:00:45 +01:00
Sebastian Huber 5a2ab9d55e RTEMS: Timed wait by ticks <sys/lock.h> functions
Declare timed wait by ticks functions.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-30 07:00:45 +01:00
Sebastian Huber 186166f67a RTEMS: Add set/get name <sys/lock.h> functions
Add inline functions to set/get the name.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-30 07:00:45 +01:00
Yaakov Selkowitz 6f84ee8105 ssp: add build infrastructure
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29 11:25:46 -06:00
Yaakov Selkowitz 192de5a349 ssp: add documentation
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29 11:25:45 -06:00
Yaakov Selkowitz 6b02865d80 ssp: add Object Size Checking for unistd.h, part 1
The implementation is from NetBSD, with the addition of feature test macros
for readlink.  glibc also wraps the following functions:
confstr, getdomainname, getgroups, gethostname, getlogin_r, getwd, pread,
readlinkat, ttyname_r.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29 11:25:44 -06:00
Yaakov Selkowitz 576093d46b ssp: add Object Size Checking for stdio.h, part 1
The implementation is mostly from NetBSD, except for switching fgets to
pure inline, and the addition of fgets_unlocked, fread, and fread_unlocked
for parity with glibc.  The following functions are also guarded in glibc:
asprintf, dprintf, fprintf, printf, vasprintf, vdprintf, vfprintf, vprintf.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29 11:25:42 -06:00
Yaakov Selkowitz a997f98b2a ssp: add Object Size Checking for strings.h
The implementation is from NetBSD, with the addition of explicit_bzero
for parity with glibc.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29 11:25:41 -06:00
Yaakov Selkowitz e4fc4d7bc4 ssp: add Object Size Checking for string.h
The implementation is from NetBSD, with the addition of mempcpy (a GNU
extension) for parity with glibc and libssp.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29 11:25:40 -06:00
Yaakov Selkowitz 3e8fc7d9f2 ssp: add Object Size Checking common code
The Object Size Checking (-D_FORTIFY_SOURCE=*) functionality provides
wrappers around functions suspectible to buffer overflows.  While
independent from Stack Smashing Protection (-fstack-protector*), they
are often used and implemented together.

While GCC also provides an implementation in libssp, it is completely
broken (CVE-2016-4973, RHBZ#1324759) and seemingly unfixable, as there
is no reliable way for a preprocessor macro to trigger a link flag.
Therefore, adding this here is necessary to make it work.

Note that this does require building gcc with --disable-libssp and
gcc_cv_libc_provides_ssp=yes.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29 11:25:39 -06:00
Yaakov Selkowitz 0a5dfdbd1b ssp: add APIs for Stack Smashing Protection
Compiling with any of the -fstack-protector* flags requires the
__stack_chk_guard data import (which needs to be initialized) and the
__stack_chk_fail{,_local} functions.  While GCC's own libssp can provide
these, it is better that we provide these ourselves.  The implementation
is custom due to being OS-specific.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-29 11:25:37 -06:00
Corinna Vinschen 1bbdb3c953 newlib: [w]scanf: Fix behaviour on matching failure
The special handling of %\0 in [w]scanf is flawed.  It's just a
matching failure and should be handled as such.  scanf also
fakes an int input value on %X with X being an invalid conversion
char.  This is also just a matching failure and should be handled
the same way as %\0.

There's no indication of the reason for this "disgusting
backwards compatibility hacks" in the logs, given this
code made it into newlib before setting up the CVS repo.

Just handle these cases identically as matching failures.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-29 15:01:30 +01:00
Yaakov Selkowitz 36a0a675b4 Make __nonnull macro compatible with glibc
This form allows for multiple arguments, e.g. __nonnull((1,2)).

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-28 10:26:29 -06:00
Yaakov Selkowitz f2b27ce620 cygwin: define _POSIX_TIMEOUTS
Since commit 8128f5482f, we have all the
non-tracing functions listed in posixoptions(7).  The tracing functions
are gated by their own option, and are obsolecent anyway.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-11-28 10:26:00 -06:00
Giacomo Tesio 82fba2cb99 jehanne: pass argc & argv to __application_newlib_init 2017-11-23 01:18:58 +01:00
Jeff Johnston 569d048c89 Add the Aarch64 SVE specific HWCAP_SVE define
Checking in change from Alan Hayward <Alan.Hayward@arm.com>

Signed-off-by: Jeff Johnston <jjohnstn@redhat.com>
2017-11-22 14:10:37 -05:00
Giacomo Tesio bd9dbaca9f jehanne: mock ioctl and tcflush 2017-11-22 03:17:53 +01:00
Sebastian Huber 6480987f3a RTEMS: Add missing __getreent() to crt0
Default implementation was removed for RTEMS by
b1a388799d.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-20 10:12:18 +01:00
Sebastian Huber 0e3e375377 RTEMS: Add missing functions to crt0
This helps to get some more features from libstdc++.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-20 08:53:30 +01:00
Giacomo Tesio ddaa91f0e9 jehanne: fix fcntl(F_GETFD) 2017-11-20 01:14:10 +01:00
Giacomo Tesio d8eeb3b302 jehanne: define SIGCLD as SIGCHLD 2017-11-15 00:32:13 +01:00
Corinna Vinschen baaceb8f37 Cygwin: fcntl.h: Use test macros to guard non-standard open flags
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-14 21:45:31 +01:00
Corinna Vinschen f9d071aaf8 Cygwin: fcntl.h: Define O_NOATIME
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-14 21:45:31 +01:00
Corinna Vinschen 0aa99373c1 Cygwin: fcntl.h: Define O_TMPFILE and implement it
Difference to Linux: We can't create files which don't show up
in the filesystem due to OS restrictions.  As a kludge, make a
(half-hearted) attempt to hide the file in the filesystem.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-11-14 21:45:25 +01:00
Florian Schmidt 9cf0c4a012 newlib/libc/stdlib/realloc.c: fix variable name
The variable doesn't follow the convention of having the same name as
the function it's bundled with. Furthermore, it clashes with the
variable of the same name in newlib/libc/stdlib/calloc.c.

Signed-off-by: Florian Schmidt <florian.schmidt@neclab.eu>
2017-11-14 10:18:30 +01:00
Joel Sherrill b1a388799d newlib/.../getreent.c: Allow to be provided by host and do so for RTEMS
RTEMS provides the option to have a global or per-thread reentrancy
as part of application configuration. As part of this, RTEMS provides
the implementation of __getreent() as appropriate. Allow the target
to determine if this method is present in libc.a.
2017-11-13 10:19:23 +01:00
Sebastian Huber 1f42dc2bcf Make ffsl() and ffsll() BSD-visible
Since glibc 2.27, they are visible via _DEFAULT_SOURCE (__USE_MISC):

https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/man3/ffs.3?id=247bbcf00c9a425ab0ad6e303ec8718e4ba844a6

In FreeBSD, they are guarded by __BSD_VISIBLE.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-11-03 10:46:07 +01:00
Joel Sherrill 076ce7098f newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS
The *-*-rtems* targets defined this even though the conditional
was no longer present in i386/setjmp.S.
2017-11-02 09:27:15 +01:00
Sebastian Huber ce189d8afe RTEMS: Remove internal timecounter API
Change copyright.  Original BSD content moved to
<machine/_kernel_time.h>.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-10-26 08:47:21 +02:00
Szabolcs Nagy 56e494c074 fix internal __ieee754_expf and __ieee754_logf calls
The recently added new math code inlines error handling instead of using
error handling wrappers around __ieee754* internal symbols, and thus the
__ieee754* symbols are no longer provided.

However __ieee754_expf and __ieee754_logf are used in the implementation
of a number of other math functions.  These symbols are safe to redirect
to the external expf and logf symbols, because those names are always
reserved when single precision math functions are reserved and the
additional error handling code is either not reached or there will be
an error in the final result that will override an internal spurious
errno setting.

For consistency all of __ieee754_expf, __ieee754_logf and __ieee754_powf
are redirected using a macro.
2017-10-20 11:19:02 +02:00
Giacomo Tesio 1f8761d0ab jehanne: improve kernel errors management 2017-10-19 23:05:48 +02:00
Szabolcs Nagy c156098271 New expf, exp2f, logf, log2f and powf implementations
Based on code from https://github.com/ARM-software/optimized-routines/

This patch adds a highly optimized generic implementation of expf,
exp2f, logf, log2f and powf.  The new functions are not only
faster (6x for powf!), but are also smaller and more accurate.
In order to achieve this, the algorithm uses double precision
arithmetic for accuracy, avoids divisions and uses small table
lookups to minimize the polynomials.  Special cases are handled
inline to avoid the unnecessary overhead of wrapper functions and
set errno to POSIX requirements.

The new functions are added under newlib/libm/common, but the old
implementations are kept (in newlib/libm/math) for non-IEEE or
pre-C99 systems.  Targets can enable the new math code by defining
__OBSOLETE_MATH_DEFAULT to 0 in newlib/libc/include/machine/ieeefp.h,
users can override the default by defining __OBSOLETE_MATH.
Currently the new code is enabled for AArch64 and AArch32 with VFP.
Targets with a single precision FPU may still prefer the old
implementation.

libm.a size changes:
arm: -1692
arm/thumb/v7-a/nofp: -878
arm/thumb/v7-a+fp/hard: -864
arm/thumb/v7-a+fp/softfp: -908
aarch64: -1476
2017-10-13 10:58:00 +02:00
Sebastian Huber c165a27c01 RTEMS: Fix _PTHREAD_MUTEX_INITIALIZER
Add missing braces around initializer.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-10-13 08:07:13 +02:00
Giacomo Tesio 03732ac23f jehanne: use libposix_translate_kernel_errors in default_error_translator 2017-10-13 04:12:43 +02:00
Michael Haubenwallner 15de9da0b9 Fix typo with newlib-long-time_t default value.
Fix typo for newlib-long-time_t to leave newlib-nano-malloc alone.
2017-10-09 17:55:19 +02:00
Sebastian Huber 3a79700c2d RTEMS: Make pthread_mutex_t self-contained
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-10-05 14:56:13 +02:00
Sebastian Huber 55c5dda9b5 RTEMS: Make pthread_cond_t self-contained
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-10-05 14:56:13 +02:00
Sebastian Huber d902eef093 RTEMS: Make pthread_rwlock_t self-contained
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-10-05 14:56:13 +02:00
Sebastian Huber 9187bb23a0 RTEMS: Make pthread_barrier_t self-contained
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-10-05 14:56:13 +02:00
Sebastian Huber 8253c240cb RTEMS: Make sem_t self-contained
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-10-05 14:56:12 +02:00
Sebastian Huber 4fef7312b3 RTEMS: Optimize pthread_once_t
Reduce size of pthread_once_t and make it zero-initialized.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-10-05 14:56:12 +02:00
Giacomo Tesio cd23503dfd jehanne: add SEGV_MAPERR and SEGV_ACCERR to signal.h 2017-10-05 00:16:13 +02:00
Giacomo Tesio 18f83f51ea jehanne: add CLD_* constants for SIGCHLD 2017-10-04 00:39:52 +02:00
Giacomo Tesio 75921fd16e jehanne: implement setenv and unsetenv 2017-10-03 00:51:16 +02:00
Giacomo Tesio dfb145077c jehanne: in on_process_disposition use _REENT instead of _GLOBAL_REENT 2017-10-02 01:19:41 +02:00
Giacomo Tesio 05f05759ad jehanne: call atexit handlers on return from main 2017-10-01 22:39:53 +02:00
Giacomo Tesio 5c85f0f91d jehanne: move _fcntl_r to libposix_conf.c (to easily access fcntl.h) 2017-09-27 23:34:42 +02:00
Giacomo Tesio 8a57809fe4 jehanne: add fcntl 2017-09-27 00:39:07 +02:00
Giacomo Tesio f446c6513c jehanne: properly translate DMDIR in __stat_reader 2017-09-26 01:11:59 +02:00
Giacomo Tesio 011ef6c793 jehanne: add sys/stat.h 2017-09-25 00:30:42 +02:00
Giacomo Tesio 80499253a7 jehanne: draft termios functions 2017-09-25 00:14:44 +02:00
Giacomo Tesio d094dcaecf jehanne: siglongjmp 2017-09-24 16:35:57 +02:00
Giacomo Tesio 9369c56b97 jehanne: add sigqueue to Makefile 2017-09-24 14:59:06 +02:00
Giacomo Tesio 3b28c711f9 jehanne: fix sigwait; stub sigqueue 2017-09-22 02:10:52 +02:00
Giacomo Tesio cbfbffac50 jehanne: add alarm, sigwait, sigtimedwait and sigwaitinfo 2017-09-22 00:31:20 +02:00
Giacomo Tesio b52a46870f jehanne: add sys/_timespec.h 2017-09-21 00:15:03 +02:00
Giacomo Tesio 5aa0e08335 jehanne: add sigpending 2017-09-20 00:39:48 +02:00
Brian Inglis f9b24fad7c newlib/libm/complex/cargl.c change imag() real() to cimagl() creall() 2017-09-19 15:36:12 -05:00
Sebastian Huber 1592a0be0c Fix warnings and documentation in strnstr.c
Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-09-19 15:35:09 -05:00
Giacomo Tesio 0f0b5a3ca5 jehanne: fix Makefile; add sigsuspend 2017-09-19 00:19:28 +02:00
Giacomo Tesio fd7cb6bd3d jehanne: introduce sigaction; signal as macro 2017-09-18 00:23:10 +02:00
Giacomo Tesio 735eae7ab0 jehanne: remove raise from signal.c 2017-09-17 22:52:06 +02:00
Giacomo Tesio bf9f6865e6 jehanne: get SI_* values from posix.h 2017-09-15 00:58:20 +02:00
Giacomo Tesio 188433192c jehanne: deep refactoring of signals (WIP) 2017-09-14 00:25:19 +02:00
Giacomo Tesio 95383ee144 jehanne: define SIGNAL_PROVIDED in configure.host 2017-09-14 00:07:08 +02:00
Giacomo Tesio ed05094c78 jehanne: fix signal headers 2017-09-14 00:06:29 +02:00
Giacomo Tesio b891b3c8da jehanne: exploring a deep refactoring for signals 2017-09-13 01:37:54 +02:00
Giacomo Tesio 31d2a8df16 jehanne: define SIGRTMIN and SIGRTMAX 2017-09-13 00:17:01 +02:00
Giacomo Tesio db0b84d2e2 jehanne: add sigprocmask 2017-09-12 00:49:17 +02:00
Giacomo Tesio 7ce34f8fbf jehanne: implement various sigset functions 2017-09-12 00:27:45 +02:00
Giacomo Tesio 861774c0c8 jehanne: drafter sys/signal.h 2017-09-11 00:35:32 +02:00
Giacomo Tesio 7f5b6a5ef1 jehanne: add sigaction (in libposix_conf.c)
This implementation ignores both flags and mask:
- ignoring SA_SIGINFO in sa_flags means that sigaction forward to the signal machinery
- ignoring sa_mask means that no mask is set for the signal (but note that Jehanne's notes
  are not reentrant).
2017-09-10 23:42:01 +02:00
Giacomo Tesio cb02879013 jehanne: add getpgid 2017-09-07 23:34:29 +02:00
Giacomo Tesio 8194f38dc0 jehanne: add rename 2017-09-07 23:32:26 +02:00
Giacomo Tesio 7f64bcd6ac jehanne: let libposix define environ 2017-09-07 22:35:51 +02:00
Giacomo Tesio 775d703f25 jehanne: define _execve (directly used by libc/posix/execve.c) 2017-09-07 19:45:47 +02:00
Sebastian Huber 4de8754bac Change time_t to 64-bit by default
In order to avoid the year 2038 problem, define time_t to a signed
integer with at least 64-bits.  The type for time_t can be forced to
long with the --enable-newlib-long-time_t configure option or with the
_USE_LONG_TIME_T system configuration define.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-09-07 15:39:34 +02:00
Sebastian Huber ad45b86533 Remove harmful casts in gmtime_r()
In case time_t is long, then the cast to long is a nop.  In case time_t
is __int_least64_t, then the cast to long may truncate the value before
the division.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-09-07 15:39:34 +02:00
Sebastian Huber f9205f1d47 Let RTEMS provide clock()
Newlib uses _times_r() in clock().  The problem is that the _times_r()
clock frequency is defined by sysconf(_SC_CLK_TCK).  The clock frequency
of clock() is the constant CLOCKS_PER_SEC.

FreeBSD uses getrusage() for clock().  Since RTEMS has only one process,
the implementation can be simplified.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
2017-09-07 07:41:07 +02:00
Giacomo Tesio 4651a34e15 jehanne: add getpgrp 2017-09-07 00:45:20 +02:00
Giacomo Tesio dc3e8f850e jehanne: add chmod and fchmodat 2017-09-06 22:57:34 +02:00
Giacomo Tesio 656e79e567 jehanne: add umask 2017-09-06 22:57:00 +02:00
Giacomo Tesio 2c43a16b92 jehanne: add sys/termios.h 2017-09-06 00:37:03 +02:00
Giacomo Tesio 3cf88753d0 jehanne: added sys/ioctl.h (still to be implemented) 2017-09-05 23:57:41 +02:00
Giacomo Tesio c238125c93 jehanne: add get/set functions for uid, gid, euid, egid, pgid, sid, reuid... 2017-09-05 00:42:26 +02:00
Corinna Vinschen e18b7ffa48 stdio.h: Don't define unlocked macros using static inline on C++
In C++, the usage of static inline functions for getchar_unlocked and
putchar_unlocked may result in error messages like

  error: ‘_putchar_unlocked’ was not declared in this scope

Fix this by not using the _getchar_unlocked and _putchar_unlocked
macros in C++.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2017-09-04 10:52:33 +02:00
Giacomo Tesio 9e4ae4bc97 jehanne: add readlink and readlinkat 2017-09-03 23:56:10 +02:00
Giacomo Tesio 7928dac6c6 jehanne: add setjmp.h 2017-09-03 22:27:44 +02:00
Giacomo Tesio 08c85f7606 jehanne: add sys/resource.h and getrusage 2017-09-03 22:19:40 +02:00
Giacomo Tesio ed6683643a jehanne: add lstat (as alias of stat), dup and dup2 2017-09-03 22:18:20 +02:00
Giacomo Tesio bae05fec4e jehanne: add chmod functions (just calling libposix) 2017-08-31 01:16:40 +02:00
Yaakov Selkowitz 51d1fb715d include: fix ffs, fls guards
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-08-30 12:29:47 -05:00