Commit graph

368 commits

Author SHA1 Message Date
Pieter du Preez 264b817b8e Define the newlib version macros in one place: _newlib_version.h.
Currently, the newlib version information needs to be updated in two places:
 - newlib/acinclude.m4
 - newlib/libc/include/sys/features.h

The goal of this patch is to:
 - supply a single location for defining the newlib version
   information: newlib/acinclude.m4
 - define __NEWLIB__, __NEWLIB_MINOR__ and __NEWLIB_PATCHLEVEL__
   This is in line with what gcc does for its version macros. See:
   https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

This patch moves the definition of the _NEWLIB_VERSION, __NEWLIB__
and __NEWLIB_MINOR__ macros from newlib/libc/include/sys/features.h,
to the newly generated newlib/_newlib_version.h file. Additionally,
the __NEWLIB_PATCHLEVEL__ macro was created, for completeness.

In order to stay backwards compatible, newlib/_newlib_version.h gets
included by newlib/newlib.h and newlib/libc/include/sys/features.h.

Note: This patch does _not_ include the modifications to the following
files, as these should all be generated any way.
      *Makefile.in,
      *aclocal.m4,
      *configure
      stamp-* files

Signed-off-by: Pieter du Preez <pdupreez@gmail.com>
2016-02-17 16:04:09 -05:00
Jeff Johnston c2a27453c6 Change if_nameindex() to use unsigned int i variable.
- i variable used in loop that shifts to right so use
  unsigned int instead
2016-02-04 13:30:14 -05:00
Thomas Preud'homme 69f4c40291 Make macro checks ARMv8-M baseline proof
libgloss:

        * arm/Makefile.in: Add newlib/libc/machine/arm to the include path if
        newlib is present.
        * arm/arm.h: Include acle-compat.h.
        (THUMB_V7_V6M): Rename to ...
        (PREFER_THUMB): This.  Use ACLE macros __ARM_ARCH_ISA_ARM instead of
        __ARM_ARCH_6M__ to decide whether to define it.
        (THUMB1_ONLY): Define for Thumb-1 only targets.
        (THUMB_V7M_V6M): Rename to ...
        (THUMB_VXM): This.  Defined based on __ARM_ARCH_ISA_ARM, excluding
        ARMv7.
        * arm/crt0.S: Use THUMB1_ONLY rather than __ARM_ARCH_6M__,
        !__ARM_ARCH_ISA_ARM rather than THUMB_V7M_V6M for fp enabling, and
        PREFER_THUMB rather than THUMB_V7_V6M.  Rename other occurences of
        THUMB_V7M_V6M to THUMB_VXM.
        * arm/linux-crt0.c: Likewise.
        * arm/redboot-crt0.S: Likewise.
        * arm/swi.h: Likewise.
        * arm/trap.S: Likewise.

newlib:

        * libc/machine/arm/memcpy-stub.c: Use ACLE macros __ARM_ARCH_ISA_THUMB
        and __ARM_ARCH_ISA_ARM to check for Thumb-2 only targets rather than
        __ARM_ARCH and __ARM_ARCH_PROFILE.
        * libc/machine/arm/memcpy.S: Likewise.
        * libc/machine/arm/setjmp.S: Likewise for Thumb-1 only target and
        include acle-compat.h.
        * libc/machine/arm/strcmp.S: Likewise for Thumb-1 and Thumb-2 only
        target and include acle-compat.h.
        * libc/sys/arm/arm.h: Include acle-compat.h.
        (THUMB_V7_V6M): Rename to ...
        (PREFER_THUMB): This.  Use ACLE macro __ARM_ARCH_ISA_ARM instead of
        __ARM_ARCH_6M__ to decide whether to define it.
        (THUMB1_ONLY): Define for Thumb-1 only targets.
        (THUMB_V7M_V6M): Rename to ...
        (THUMB_VXM): This.  Defined based on __ARM_ARCH_ISA_ARM, excluding
        ARMv7.
        * libc/sys/arm/crt0.S: Use PREFER_THUMB rather than THUMB_V7_V6M and
        rename THUMB_V7M_V6M into THUMB_VXM.
        * libc/sys/arm/swi.h: Likewise.
2016-01-28 11:26:37 +01:00
Jeff Johnston ad7b3cde9c Regenerate files for newlib 2.3.0. 2015-12-21 21:32:11 -05:00
Nick Withers 5644f71428 Add definitions for NBBY to arm and rtems targets
* libc/sys/arm/sys/param.h (NBBY): Define if not already defined.
	* libc/sys/rtems/include/sys/param.h (NBBY): Define.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-12-07 16:31:00 +01:00
Anton Kolesov e945a19cb2 Remove obsolete ARC system
ARC architecture specific files has been added ages ago in newlib/libc/sys,
but with invention of libgloss those files should be moved from newlib to
libgloss.

newlib/ChangeLog:
2015-11-12  Anton Kolesov  <Anton.Kolesov@synopsys.com>

	* configure.host: Remove ARC system.
	* libc/sys/configure: Likewise.
	* libc/sys/configure.in: Likewise.
	* libc/sys/arc/Makefile.am: Likewise.
	* libc/sys/arc/Makefile.in: Likewise.
	* libc/sys/arc/aclocal.m4: Likewise.
	* libc/sys/arc/configure: Likewise.
	* libc/sys/arc/configure.in: Likewise.
	* libc/sys/arc/crt0.S: Likewise.
	* libc/sys/arc/dummy.S: Likewise.
	* libc/sys/arc/isatty.c: Likewise.
	* libc/sys/arc/mem-layout.c: Likewise.
	* libc/sys/arc/sbrk.c: Likewise.
	* libc/sys/arc/sys/syscall.h: Likewise.
	* libc/sys/arc/syscalls.c: Likewise.
2015-11-12 14:03:05 +01:00
Jeff Johnston 0631279394 Move duplicated documentation rules to Makefile.shared
- Also, harmonize libm to use CHEWOUT_FILES like libc, rather than chobj.
  Update documentation appropriately.

        * HOWTO: Update.
        * Makefile.shared: Move documentation rules to here...
        * libc/argz/Makefile.am: ... from here ...
        * libc/ctype/Makefile.am: ... and here.
        * libc/errno/Makefile.am: Ditto.
        * libc/iconv/Makefile.am: Ditto.
        * libc/iconv/ccs/Makefile.am : Ditto.
        * libc/iconv/ces/Makefile.am: Ditto.
        * libc/iconv/lib/Makefile.am: Ditto.
        * libc/locale/Makefile.am: Ditto.
        * libc/misc/Makefile.am: Ditto.
        * libc/posix/Makefile.am: Ditto.
        * libc/reent/Makefile.am: Ditto.
        * libc/search/Makefile.am: Ditto.
        * libc/stdio/Makefile.am: Ditto.
        * libc/stdio64/Makefile.am: Ditto.
        * libc/stdlib/Makefile.am : Ditto.
        * libc/string/Makefile.am: Ditto.
        * libc/syscalls/Makefile.am: Ditto.
        * libc/time/Makefile.am : Ditto.
        * libc/unix/Makefile.am: Ditto.
        * libc/xdr/Makefile.am: Ditto.
        * libm/common/Makefile.am: Ditto.
        * libm/complex/Makefile.am: Ditto.
        * libm/math/Makefile.am: Ditto.
        * libm/mathfp/Makefile.am: Ditto.
2015-11-02 18:02:39 -05:00
Jeff Johnston c98d01ee0c Import <threads.h> from latest FreeBSD.
- Move types and defines to
  <machine/_threads.h> so that it can be customized per target.

	* libc/include/threads.h: New.
	* libc/sys/rtems/include/machine/_threads.h: Likewise.
2015-10-13 17:52:34 -04:00
Andre Vieira 9303de77d9 Add MIN MAX macro to param header file.
newlib/ChangeLog:
2015-07-28  Andre Vieira  <andre.simoesdiasvieira@arm.com>

   * libc/sys/arm/sys/param.h (MIN,MAX): Define.

From 536ca7365d269f5e56679048e336d6969186d550 Mon Sep 17 00:00:00 2001
From: Andre Simoes Dias Vieira <andsim01@arm.com>
Date: Tue, 28 Jul 2015 14:19:08 +0100
Subject: [PATCH] Added min max macros
2015-08-20 10:52:34 +02:00
Andre Vieira a732159809 Use machine header file for endianness configuration.
newlib/ChangeLog:
2015-07-28  Andre Vieira  <andre.simoesdiasvieira@arm.com>

   * libc/sys/arm/sys/param.h (BIG_ENDIAN, LITTLE_ENDIAN): Moved
   to machine/endian.h.
   * libc/machine/arm/machine/param.h (BYTE_ORDER): Idem.
   * libc/machine/arm/machine/endian.h: New.

From ca6efccda91bc6b620b7d96a466b0f1e2f02cfeb Mon Sep 17 00:00:00 2001
From: Andre Simoes Dias Vieira <andsim01@arm.com>
Date: Tue, 28 Jul 2015 12:16:20 +0100
Subject: [PATCH 2/2] Move endianness configuration to machine/endian.h
2015-08-20 10:52:34 +02:00
Andre Vieira 573532df7f Use machine header file for param configuration.
On 31/07/15 10:34, Richard Earnshaw wrote:
> On 31/07/15 10:28, Andre Vieira wrote:
>> newlib/ChangeLog:
>> 2015-07-28  Andre Vieira  <andre.simoesdiasvieira@arm.com>
>>
>>    * libc/sys/arm/sys/param.h: Include machine/param.h
>>    (HZ, NOFILE, PATHSIZE): Define.
>>
>> param_refactor_1.patch
>>
>>
>>  From abc2d5f3398721f6ca891b9581feaba58730b19c Mon Sep 17 00:00:00 2001
>> From: Andre Simoes Dias Vieira <andsim01@arm.com>
>> Date: Tue, 28 Jul 2015 12:10:59 +0100
>> Subject: [PATCH 1/2] Moved param configuration to machine/param.h
>>
>> ---
>>   newlib/libc/sys/arm/sys/param.h | 12 ++++++++++--
>>   1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/newlib/libc/sys/arm/sys/param.h b/newlib/libc/sys/arm/sys/param.h
>> index adc066e9a8756e07edaaa8cadc79b5f05c996ac9..622c371972ab3c9dbb93ea5c51323a593e2a171a 100644
>> --- a/newlib/libc/sys/arm/sys/param.h
>> +++ b/newlib/libc/sys/arm/sys/param.h
>> @@ -3,9 +3,17 @@
>>   #ifndef _SYS_PARAM_H
>>   # define _SYS_PARAM_H
>>
>> -# define HZ (100)
>> -# define NOFILE	(60)
>> +#include <machine/param.h>
>> +
>> +#ifndef HZ
>> +# define HZ (60)
>
> Why have you changed the value for HZ?  It seems that, by convention,
> ARM boards have always used 100.
>
> R.
>
>> +#endif
>> +#ifndef NOFILE
>> +# define NOFILE>(60)
>> +#endif
>> +#ifndef PATHSIZE
>>   # define PATHSIZE (1024)
>> +#endif
>>
>>   #define BIG_ENDIAN      4321
>>   #define LITTLE_ENDIAN   1234
>>
>
Hi Richard,

ARM's machine/param.h that is included in "#include <machine/param.h>",
before the 'ifndef' already defines HZ to be 100. This file was already
there, it was just not being used. I understand that this 'ifndef' might
be confusing, though I decided to add it to mimic the behavior of the
default sys/param.h.

There is however an unrelated issue with this patch, a typo in the
"#define NOFILE" that crept in there due to some copy pasting when
splitting the patch.

Here is a fixed version.

BR,
Andre

newlib/ChangeLog:
2015-07-28  Andre Vieira  <andre.simoesdiasvieira@arm.com>

   * libc/sys/arm/sys/param.h: Include machine/param.h
   (HZ, NOFILE, PATHSIZE): Define.

From abc2d5f3398721f6ca891b9581feaba58730b19c Mon Sep 17 00:00:00 2001
From: Andre Simoes Dias Vieira <andsim01@arm.com>
Date: Tue, 28 Jul 2015 12:10:59 +0100
Subject: [PATCH 1/2] Moved param configuration to machine/param.h
2015-08-20 10:52:34 +02:00
Jeff Johnston 4098f69c43 or1k: Fix critical handling in malloc locks
Only on first call to the recursive malloc lock the restore value of
    exception enable fields is stored.

    	  * libc/sys/or1k/mlock.c: Fix exception enable saving
2015-08-07 15:01:58 -04:00
Sebastian Huber b7ca25162a Fix typo in <sys/lock.h>
Sorry, there was a typo in <sys/lock.h> which leads to memory corruption
since not enough space is reserved for the lock object.

newlib/ChangeLog
2015-07-30  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* libc/sys/rtems/include/sys/lock.h (__LOCK_INIT_RECURSIVE): Use
	proper type.
2015-07-31 06:21:04 -07:00
Sebastian Huber f04e46b141 Move header files
During libgcc build the first include search path for <...> is
"../newlib/libc/sys/rtems/include".  Move all RTEMS specific header
files to "libc/sys/rtems/include" so that they can be found.  Later
during libc build the header files in the previous location were somehow
present, but for libgcc build they were invisible.  This change is
necessary to use <pthread.h> for the GCC thread model implementation.

newlib/ChangeLog
2015-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	libc/sys/rtems/machine/_types.h: Move to ...
	libc/sys/rtems/include/machine/_types.h: ... here.
	libc/sys/rtems/machine/limits.h: Move to ...
	libc/sys/rtems/include/machine/limits.h: ... here.
	libc/sys/rtems/machine/param.h: Move to ...
	libc/sys/rtems/include/machine/param.h: ... here.
	libc/sys/rtems/sys/cpuset.h: Move to ...
	libc/sys/rtems/include/sys/cpuset.h: ... here.
	libc/sys/rtems/sys/dirent.h: Move to ...
	libc/sys/rtems/include/sys/dirent.h: ... here.
	libc/sys/rtems/sys/param.h: Move to ...
	libc/sys/rtems/include/sys/param.h: ... here.
	libc/sys/rtems/sys/syslimits.h: Move to ...
	libc/sys/rtems/include/sys/syslimits.h: ... here.
	libc/sys/rtems/sys/utime.h: Move to ...
	libc/sys/rtems/include/sys/utime.h: ... here.
2015-07-29 12:53:53 -07:00
Sebastian Huber ecaef05f66 Add <sys/lock.h>
Provide self-contained synchronization objects for RTEMS.  The API was
designed to be able to use it for the Newlib internal locks, the C11
threads support, the GCC thread model support and the libgomp operating
system configuration in combination with <pthread.h>.

References:

https://lists.rtems.org/pipermail/devel/2015-July/011989.html
https://lists.rtems.org/pipermail/devel/2015-July/012000.html

Tickets:

https://devel.rtems.org/ticket/1247
https://devel.rtems.org/ticket/2274.

v2: Fix typo in _Condition_Wait_recursive_timed() declaration.

newlib/ChangeLog
2015-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* libc/sys/rtems/include/sys/lock.h: New.
2015-07-29 11:30:05 -07:00
Sebastian Huber 897d3a3cc4 Add <sys/_stdint.h> for FreeBSD compatibility
* libc/include/sys/_stdint.h: New file.
        * libc/include/stdint.h (int8_t): Move to <sys/_stdint.h>.
        (uint8_t): Likewise.
        (int16_t): Likewise.
        (uint16_t): Likewise.
        (int32_t): Likewise.
        (uint32_t): Likewise.
        (int64_t): Likewise.
        (uint64_t): Likewise.
        (intptr_t): Likewise.
        (uintptr_t): Likewise.
        * libc/include/sys/types.h: Include <sys/_stdint.h>.
        * libc/sys/rtems/machine/_types.h: Remove <stdint.h> include.
        * libc/sys/time.h>: Replace __uint32_t with uint32_t and
        __uint64_t with uint64_t.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-04-23 21:57:10 +02:00
Sebastian Huber c93d44add9
Import libc/sys/rtems/include/semaphore.h from FreeBSD.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2015-03-12 16:03:42 +01:00
Yaakov Selkowitz 128e9e0be5 * libc/sys/sparc64/sys/time.h: #include <sys/types.h> for time_t. 2015-01-22 17:34:47 +00:00
Corinna Vinschen bdc1799556 * libc/sys/or1k/mlock.c: Fix dependency on libgloss. 2015-01-22 15:32:51 +00:00
Corinna Vinschen 43f80ffb7d Fix typo in entry header 2015-01-20 12:27:30 +00:00
Corinna Vinschen 29193dd04c * configure.host: Add extra system for OpenRISC baremetal
* libc/include/sys/config.h: Dynamic reentrancy for or1k sys targets
	* libc/sys/or1k/: New system for or1k baremetal
	* libc/sys/or1k/Makefile.am: New file
	* libc/sys/or1k/Makefile.in: New file
	* libc/sys/or1k/aclocal.m4: New file
	* libc/sys/or1k/configure.in: New file
	* libc/sys/or1k/configure: New file
	* libc/sys/or1k/getreent.S: New file
	* libc/sys/or1k/mlock.S: New file
	* libc/sys/or1k/or1k-asm.S: New file
2015-01-14 09:25:16 +00:00
Jeff Johnston 0615b4bb5f 2014-12-18 Jeff Johnston <jjohnstn@redhat.com>
* NEWS: Update with 2.2.0 info.
        * README: Ditto.
        * acinclude.m4: Change version number to 2.2.0.
        * libc/libc.texinfo: Ditto.
        * libm/libm.texinfo: Ditto.
        * configure: Regenerated.
        * Makefile.in: Regenerated.
        * doc/configure: Ditto.
        * libc/*/configure: Ditto.
        * libm/*/configure: Ditto.
        * libc/sys/linux/shared.ld: Add VERS_2.2
2014-12-18 20:30:11 +00:00
Corinna Vinschen 308186a134 * libc/sys/rtems/sys/syslimits.h (NGROUPS_MAX): Adjust value so
that NGROUPS is even.
2014-11-20 14:03:17 +00:00
Eric Blake ada456dcfe headers: properly decorate attributes
Found by:
find -name '*.h' |xargs grep -i 'attribute.*(([a-z]'

For an example of the type of bugs this causes, try compiling this valid
C11 program (it's valid because 'noreturn' is reserved for use in the
user namespace unless you include <stdnoreturn.h>):

$ cat foo.c
#define noreturn __attribute__((noreturn))
#include <stdlib.h>
$ gcc -c -o foo.o -Wall foo.c
In file included from /usr/include/stdlib.h:11:0,
                 from foo.c:2:
foo.c:1:18: error: expected ')' before '__attribute__'
 #define noreturn __attribute__((noreturn))
                  ^
/usr/include/stdlib.h:66:28: error: expected ',' or ';' before ')' token
 _VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
                            ^

* libc/machine/spu/spu_timer_internal.h: Decorate attribute names
with __, for namespace safety.
* libc/machine/xscale/machine/profile.h: Likewise.
* libc/include/stdlib.h: Likewise.
* libc/include/_ansi.h: Likewise.
* libc/include/sys/unistd.h: Likewise.
* libc/sys/linux/linuxthreads/libc-symbols.h: Likewise.
* libc/sys/linux/linuxthreads/internals.h: Likewise.
* libc/sys/linux/machine/i386/weakalias.h: Likewise.
* libc/sys/linux/machine/i386/dl-procinfo.h: Likewise.
* libc/sys/linux/machine/i386/dl-machine.h: Likewise.
* libc/sys/linux/libc-symbols.h: Likewise.
* libc/sys/linux/iconv/gconv_charset.h: Likewise.
* libc/sys/linux/include/resolv.h: Likewise.
* libc/sys/linux/sys/unistd.h: Likewise.
* libc/sys/linux/dl/atomicity.h: Likewise.
* libc/sys/linux/dl/dynamic-link.h: Likewise.
* libc/sys/linux/dl/ldsodefs.h: Likewise.
2014-08-01 15:44:51 +00:00
Corinna Vinschen a6e73f9505 * libc/sys/rtems/sys/cpuset.h (CPU_SET_S): Add const qualifier.
(CPU_SET): Likewise.
2014-04-14 14:08:26 +00:00
Jeff Johnston d3925b72d5 2014-04-04 Ashish Kapania <akapania@ti.com>
* configure.host (sys_dir, newlib_cflags): Set sys_dir to tirtos and use
        -D__DYNAMIC_REENT__ and -DMALLOC_PROVIDED compiler options for TIRTOS
        target.
        * libc/stdio/local.h (_STDIO_CLOSE_PER_REENT_STD_STREAMS): Change #ifdef
        to not define this macro when __tirtos__ is defined.
        * libc/sys/tirtos : Add support for TIRTOS.
        * libc/sys/tirtos/Makefile.am, libc/sys/tirtos/lock.c: New files.
        * libc/sys/tirtos/configure.in, libc/sys/tirtos/include/sys/lock.h: Ditto.
2014-04-04 21:40:59 +00:00
Jeff Johnston 35dcecc6db 2014-02-11 Joey Ye <joey.ye@arm.com>
* libc/sys/arm/syscalls.c (_sbrk): Define as weak symbols.
        (_read, _write): Ditto.
2014-02-11 19:54:30 +00:00
Jeff Johnston 5ac847c629 2013-12-23 Jeff Johnston <jjohnstn@redhat.com>
* NEWS: Update with 2.1.0 info.
        * README: Ditto.
        * acinclude.m4: Change version number to 2.1.0.
        * aclocal.m4: Regenerated.
        * configure: Ditto.
        * Makefile.in: Regenerated.
        * doc/aclocal.m4: Ditto.
        * doc/configure: Ditto.
        * libc/*/aclocal.m4: Ditto.
        * libc/*/configure: Ditto.
        * libc/libc.texinfo: Ditto.
        * libm/*/aclocal.m4: Ditto.
        * libm/*/configure: Ditto.
        * libm/libm.texinfo: Ditto.
        * libc/sys/linux/shared.ld: Add VERS_2.1
2013-12-23 20:45:10 +00:00
Corinna Vinschen a6a307d8c2 * libc/sys/rtems/include/limits.h: Update page size to match
libc/sys/rtems/machine/param.h.
2013-12-10 09:20:37 +00:00
Corinna Vinschen f4fc6b0663 * libc/sys/rtems/sys/cpuset.h: Use __inline instead of inline. 2013-12-03 16:07:33 +00:00
Corinna Vinschen 9bd3bcc642 * libc/include/machine/_default_types.h: Move extern "C" after
header includes.  Include <sys/features.h> for
	__GNUC_PREREQ__().
	(__u?int.*_t): Define via GCC provided __U?INT.*_TYPE__ if
	available.
	(__intptr_t): Define.
	(__uintptr_t): Likewise.
	* libc/include/stdint.h: Include <machine/_default_types.h>
	instead of <_ansi.h>.
	(u?int.*_t): Define via __u?int.*_t provided by
	<machine/_default_types.h>.
	(u?int_fast.*_t): Define via GCC provided
	__U?INT_FAST.*_TYPE__ if available.
	(U?INT.*(MIN|MAX)): Define via GCC provided __U?INT.*(MIN|MAX)__
	if available.
	(U?INT.*_C): Define via GCC provided __U?INT.*_C if available.
	* libc/include/sys/cdefs.h: Use <machine/_default_types.h>
	instead of <stdint.h>.
	* libc/sys/rtems/sys/cpuset.h: Likewise.
	* libc/sys/rtems/machine/_types.h: Include <stdint.h> for
	FreeBSD compatibility.
2013-12-03 16:04:41 +00:00
Joel Sherrill 2d50094276 2013-11-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/sys/rtems/cpusetalloc.c: New file.
	* libc/sys/rtems/cpusetfree.c: Likewise.
	* libc/sys/rtems/Makefile.am (lib_a_SOURCES): Add new files.
	* libc/sys/rtems/Makefile.in: Regenerate.
	* libc/sys/rtems/sys/cpuset.h: Delete #if 0 block.  Include
	<stddef.h> for size_t.
	(_NCPUBITS): Avoid NBBY and assume 8 bits per char.
	(__cpuset_mask): Use int instead of size_t parameter for Linux
	compatibility.
	(__cpuset_index): Likewise.
	(__cpuset_alloc): Declare.
	(__cpuset_free): Likewise.
	(CPU_ALLOC_SIZE): Likewise.
	(CPU_ALLOC): Define.
	(CPU_FREE): Likewise.
	(CPU_ZERO_S): Likewise.
	(CPU_FILL_S): Likewise.
	(CPU_SET_S): Likewise.
	(CPU_CLR_S): Likewise.
	(CPU_ISSET_S): Likewise.
	(CPU_COUNT_S): Likewise.
	(CPU_AND_S): Likewise.
	(CPU_OR_S): Likewise.
	(CPU_XOR_S): Likewise.
	(CPU_NAND_S): Likewise.
	(CPU_EQUAL_S): Likewise.
	(CPU_ZERO): Use CPU_ZERO_S().
	(CPU_FILL): Use CPU_FILL_S().
	(CPU_SET): Use CPU_SET_S().
	(CPU_CLR): Use CPU_CLR_S().
	(CPU_ISSET): Use CPU_ISSET_S().
	(CPU_COUNT): Use CPU_COUNT_S().
	(CPU_AND): Use CPU_AND_S().
	(CPU_OR): Use CPU_OR_S().
	(CPU_XOR): Use CPU_XOR_S().
	(CPU_NAND): Use CPU_NAND_S().
	(CPU_EQUAL): Use CPU_EQUAL_S().
	(CPU_CMP): Delete superfluous const qualifier.
	(CPU_EMPTY): Likewise.
2013-11-27 14:53:59 +00:00
Joel Sherrill d482870337 2013-11-25 Sahil Patnayakuni <sahil.patnayakuni@gmail.com>
* libc/include/time.h (time): Add restrict keyword.
	* libc/include/wchar.h (wcsftime): Add restrict keyword.
	* libc/time/asctime_r.c (asctime_r): Same.
	* libc/time/gmtime_r.c (gmtime_r): Same.
	* libc/time/lcltime_r.c (lcltime_r): Same.
	* libc/time/strftime.c (strftime): Same.
	* libc/time/strptime.c (strptime): Same.
	* libc/sys/linux/linuxthreads/timer_create.c (timer_create): Same.
	* libc/sys/linux/linuxthreads/timer_settime.c (timer_settime): Same.
2013-11-25 13:46:23 +00:00
Joel Sherrill 9cd69d84ef 2013-11-22 Bryan Dunsmore <dunsmoreb@gmail.com>
* libc/include/sys/time.h (gettimeofday): Add restrict keyword.
	(setitimer): Likewise.
	* libc/sys/rdos/gettod.c (gettimeofday): Likewise.
	* libc/sys/rtems/crt0.c (gettimeofday): Likewise.
2013-11-23 01:25:47 +00:00
Joel Sherrill 849fe25d0e 2013-11-22 Chirayu Desai <chirayudesai1@gmail.com>
* libc/include/sys/unistd.h (readlink): Add restrict keyword.
	(readlinkat): Ditto.
	(swab): Ditto.
	* libc/sys/rdos/readlink.c (readlink): Ditto.
	* libc/string/swab.c (swab): Ditto.
2013-11-22 22:39:51 +00:00
Joel Sherrill 2464ecbf64 2013-11-21 Daniel Ramirez <javamonn@gmail.com>
* libc/sys/linux/statvfs.c (statvfs): Added restrict keyword.
2013-11-22 01:17:42 +00:00
Joel Sherrill d0d3968f8f 2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/sys/rdos/chown.c, libc/sys/rdos/close.c, libc/sys/rdos/execve.c,
	libc/sys/rdos/fork.c, libc/sys/rdos/fstat.c, libc/sys/rdos/getpid.c,
	libc/sys/rdos/gettod.c, libc/sys/rdos/isatty.c, libc/sys/rdos/kill.c,
	libc/sys/rdos/link.c, libc/sys/rdos/lseek.c, libc/sys/rdos/open.c,
	libc/sys/rdos/rdos.h, libc/sys/rdos/read.c, libc/sys/rdos/readlink.c,
	libc/sys/rdos/sbrk.c, libc/sys/rdos/stat.c, libc/sys/rdos/symlink.c,
	libc/sys/rdos/times.c, libc/sys/rdos/unlink.c, libc/sys/rdos/wait.c,
	libc/sys/rdos/write.c: Convert from DOS to UNIX CRLF.
2013-11-21 19:27:17 +00:00
Joel Sherrill a7c3258311 2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/posix/readdir_r.c: Add restrict keyword.
	* libc/machine/spu/sys/dirent.h, libc/sys/decstation/sys/dirent.h,
	libc/sys/linux/sys/dirent.h, libc/sys/rtems/sys/dirent.h,
	libc/sys/sparc64/sys/dirent.h, libc/sys/sun4/sys/dirent.h,
	libc/sys/sysvi386/sys/dirent.h: Add readdir_r() prototype.
2013-11-21 16:44:39 +00:00
Joel Sherrill 21cf2aee53 2013-11-21 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/sys/rdos/stat.c: Remove stray +.
2013-11-21 16:39:06 +00:00
Joel Sherrill 32e2cbeeab 2013-11-21 Daniel Ramirez <javamonn@gmail.com>
* libc/include/sys/stat.h, libc/sys/linux/sys/stat.h,
	libc/sys/m88kbug/syscalls.c, libc/sys/rdos/stat.c,
	libc/sys/sparc64/sys/stat.h: Add restrict keyword.
2013-11-21 16:35:47 +00:00
Joel Sherrill a2c4eac5d0 2013-11-20 Daniel Ramirez <javamonn@gmail.com>
* libc/iconv/lib/iconv.c, libc/include/iconv.h,
	libc/sys/linux/iconv/iconv.c: Add restrict keyword.
2013-11-20 13:39:36 +00:00
Joel Sherrill 3007afbca3 3013-11-19 Jennifer Averett <jennifer.averett@oarcorp.com>
* libc/sys/rtems/sys/cpuset.h: New file.
2013-11-19 19:11:24 +00:00
Joel Sherrill aed5f73fa8 2013-11-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/stdlib.h: Add prototype of realpath().
	* libc/sys/linux/realpath.c: Add restrict keyword.
2013-11-19 17:32:24 +00:00
Corinna Vinschen 05b637e340 * libc/include/sys/unistd.h (MAXPATHLEN): Delete.
* libc/include/sys/param.h (MAXPATHLEN): Define.
	* libc/sys/rtems/sys/param.h (MAXPATHLEN): Likewise.
	* libc/unix/getcwd.c: Include <sys/param.h> for MAXPATHLEN.
2013-10-18 08:30:29 +00:00
Joel Sherrill 77e22783e4 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/libc/sys/rtems/sys/param.h: Update some parameters to
	the latest FreeBSD values.
2013-10-15 17:40:02 +00:00
Joel Sherrill 50eb944a7c 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/sys/rtems/machine/_types.h (_HAVE_SYSTYPES): Define.
2013-10-15 17:39:19 +00:00
Joel Sherrill 8635dec1a5 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/sys/rtems/machine/_types.h (__dev_t): Define.
	(__dev_t_defined) Likewise.
	* libc/include/sys/_types.h (__dev_t): Delete RTEMS specific
	definition.
2013-10-15 17:38:32 +00:00
Joel Sherrill 7a75a3aa7c 2013-10-10 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/sys/rtems/machine/_types.h (_ssize_t): Delete.
	(__ssize_t_defined) Likewise.
2013-10-15 17:36:16 +00:00
Corinna Vinschen 454b880298 * libc/sys/arm/crt0.S: Remove 'start'. 2013-08-12 11:28:28 +00:00
Corinna Vinschen b143d094ee * libc/sys/linux/include/netdb.h, libc/sys/linux/net/getaddrinfo.c,
libc/sys/linux/net/getnameinfo.c: Add restrict keyword to getnameinfo()
	and getaddrinfo() to increase standards compliance and match glibc.

	* libc/include/string.h, libc/string/memccpy.c, libc/string/memcpy.c,
	libc/string/stpcpy.c, libc/string/stpncpy.c, libc/string/strcat.c,
	libc/string/strncat.c, libc/string/strncpy.c, libc/string/strtok.c,
	libc/string/strtok_r.c, libc/string/strxfrm.c
	libc/machine/microblaze/strcpy.c, libc/machine/xscale/memcpy.c,
	libc/machine/cris/memcpy.c: Add __restrict to prototype to
	increase standards compliance.
2013-07-23 07:05:31 +00:00