Commit Graph

9 Commits

Author SHA1 Message Date
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
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 7f9b49e427 2007-11-15 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/_default_fcntl.h: New header file that
        is the default version of sys/fcntl.h.
        * libc/include/sys/fcntl.h: Changed to simply include
        sys/_default_fcntl.h.
        * libc/sys/arm/sys/fcntl.h: New file that includes
        sys/_default_fcntl.h and defines O_BINARY.
2007-12-19 18:49:17 +00:00
Nick Clifton 7823d9bb14 Import from FSF mainline 2005-02-02 19:00:30 +00:00
Jeff Johnston f1559722eb 2004-05-07 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/param.h: Remove endian info and include
        <machine/endian.h> instead.
        * libc/include/machine/endian.h: New file.
        * libc/machine/arm/machine/endian.h: Ditto.
        * libc/machine/arm/machine/param.h: Ditto.
        * libc/sys/arm/sys/param.h: Removed.
        * libc/sys/sysvi386/sys/param.h: Ditto.
        * libc/sys/rtems/sys/param.h: Modified to include <machine/endian.h>.
2004-05-07 20:29:24 +00:00
Jeff Johnston 55105f8660 2002-06-21 Richard Earnshaw (rearnsha@arm.com)
* libc/sys/arm/sys/param.h (BIG_ENDIAN, LITTLE_ENDIAN): Define.
        (BYTE_ORDER): Define as appropriate for the target.
2002-06-21 18:44:09 +00:00
Christopher Faylor 8a0efa53e4 import newlib-2000-02-17 snapshot 2000-02-17 19:39:52 +00:00