Re: [PATCH 4/7] Port strnstr.c to FreeBSD.

2017-08-22 Thread Joel Sherrill
On Tue, Aug 22, 2017 at 10:49 AM, Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> On 17/08/17 15:17, Gedare Bloom wrote:
>
> To our C-library experts: What would be the right way of handling this?
>>>
>>> It is best to bring it in to newlib. It can temporarily come into the
>> libbsd if needed, but a note should be made to port it to newlib.
>>
>>
> Yes, this should move to Newlib.


Agreed. Much better if newlib grows. It makes it generally easier to port
other packages even when they are not part of libbsd.

--joel


>
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail  : sebastian.hu...@embedded-brains.de
>
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 4/7] Port strnstr.c to FreeBSD.

2017-08-22 Thread Sebastian Huber

On 17/08/17 15:17, Gedare Bloom wrote:


To our C-library experts: What would be the right way of handling this?


It is best to bring it in to newlib. It can temporarily come into the
libbsd if needed, but a note should be made to port it to newlib.



Yes, this should move to Newlib.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 4/7] Port strnstr.c to FreeBSD.

2017-08-17 Thread Gedare Bloom
On Thu, Aug 17, 2017 at 4:12 AM, Christian Mauderer
 wrote:
> Two points regarding patch 3 and 4:
>
> First the easy one: I expect that you need it for wpa_supplicant to
> compile? In that case these two patches should be in front of 1 and 2.
>
> The second point is harder to resolve. I wouldn't even be sure myself
> what to do here: strnstr seems to be a function provided by the C
> library. In our case that would be newlib. I'm not sure whether it is a
> good idea to import some parts of the BSD C library. On the other hand,
> there are already some other function imported from there too.
>
> To our C-library experts: What would be the right way of handling this?
>
It is best to bring it in to newlib. It can temporarily come into the
libbsd if needed, but a note should be made to port it to newlib.

> Am 17.08.2017 um 02:23 schrieb Sichen Zhao:
>> ---
>>  libbsd.py | 1 +
>>  libbsd_waf.py | 1 +
>>  2 files changed, 2 insertions(+)
>>
>> diff --git a/libbsd.py b/libbsd.py
>> index ea469d3..a0b7f1a 100644
>> --- a/libbsd.py
>> +++ b/libbsd.py
>> @@ -2534,6 +2534,7 @@ def user_space(mm):
>>  'lib/libc/stdlib/strtonum.c',
>>  'lib/libc/stdlib/strtoumax.c',
>>  'lib/libc/string/strsep.c',
>> +'lib/libc/string/strnstr.c',
>>  'lib/libc/xdr/xdr_array.c',
>>  'lib/libc/xdr/xdr.c',
>>  'lib/libc/xdr/xdr_float.c',
>> diff --git a/libbsd_waf.py b/libbsd_waf.py
>> index 329a62a..02b2cbd 100644
>> --- a/libbsd_waf.py
>> +++ b/libbsd_waf.py
>> @@ -465,6 +465,7 @@ def build(bld):
>>   'freebsd/lib/libc/stdlib/strtoimax.c',
>>   'freebsd/lib/libc/stdlib/strtonum.c',
>>   'freebsd/lib/libc/stdlib/strtoumax.c',
>> + 'freebsd/lib/libc/string/strnstr.c',
>>   'freebsd/lib/libc/string/strsep.c',
>>   'freebsd/lib/libc/xdr/xdr.c',
>>   'freebsd/lib/libc/xdr/xdr_array.c',
>>
>
> --
> 
> embedded brains GmbH
> Christian Mauderer
> Dornierstr. 4
> D-82178 Puchheim
> Germany
> email: christian.maude...@embedded-brains.de
> Phone: +49-89-18 94 741 - 18
> Fax:   +49-89-18 94 741 - 08
> PGP: Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH 4/7] Port strnstr.c to FreeBSD.

2017-08-17 Thread Christian Mauderer
Two points regarding patch 3 and 4:

First the easy one: I expect that you need it for wpa_supplicant to
compile? In that case these two patches should be in front of 1 and 2.

The second point is harder to resolve. I wouldn't even be sure myself
what to do here: strnstr seems to be a function provided by the C
library. In our case that would be newlib. I'm not sure whether it is a
good idea to import some parts of the BSD C library. On the other hand,
there are already some other function imported from there too.

To our C-library experts: What would be the right way of handling this?

Am 17.08.2017 um 02:23 schrieb Sichen Zhao:
> ---
>  libbsd.py | 1 +
>  libbsd_waf.py | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/libbsd.py b/libbsd.py
> index ea469d3..a0b7f1a 100644
> --- a/libbsd.py
> +++ b/libbsd.py
> @@ -2534,6 +2534,7 @@ def user_space(mm):
>  'lib/libc/stdlib/strtonum.c',
>  'lib/libc/stdlib/strtoumax.c',
>  'lib/libc/string/strsep.c',
> +'lib/libc/string/strnstr.c',
>  'lib/libc/xdr/xdr_array.c',
>  'lib/libc/xdr/xdr.c',
>  'lib/libc/xdr/xdr_float.c',
> diff --git a/libbsd_waf.py b/libbsd_waf.py
> index 329a62a..02b2cbd 100644
> --- a/libbsd_waf.py
> +++ b/libbsd_waf.py
> @@ -465,6 +465,7 @@ def build(bld):
>   'freebsd/lib/libc/stdlib/strtoimax.c',
>   'freebsd/lib/libc/stdlib/strtonum.c',
>   'freebsd/lib/libc/stdlib/strtoumax.c',
> + 'freebsd/lib/libc/string/strnstr.c',
>   'freebsd/lib/libc/string/strsep.c',
>   'freebsd/lib/libc/xdr/xdr.c',
>   'freebsd/lib/libc/xdr/xdr_array.c',
> 

-- 

embedded brains GmbH
Christian Mauderer
Dornierstr. 4
D-82178 Puchheim
Germany
email: christian.maude...@embedded-brains.de
Phone: +49-89-18 94 741 - 18
Fax:   +49-89-18 94 741 - 08
PGP: Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

[PATCH 4/7] Port strnstr.c to FreeBSD.

2017-08-16 Thread Sichen Zhao
---
 libbsd.py | 1 +
 libbsd_waf.py | 1 +
 2 files changed, 2 insertions(+)

diff --git a/libbsd.py b/libbsd.py
index ea469d3..a0b7f1a 100644
--- a/libbsd.py
+++ b/libbsd.py
@@ -2534,6 +2534,7 @@ def user_space(mm):
 'lib/libc/stdlib/strtonum.c',
 'lib/libc/stdlib/strtoumax.c',
 'lib/libc/string/strsep.c',
+'lib/libc/string/strnstr.c',
 'lib/libc/xdr/xdr_array.c',
 'lib/libc/xdr/xdr.c',
 'lib/libc/xdr/xdr_float.c',
diff --git a/libbsd_waf.py b/libbsd_waf.py
index 329a62a..02b2cbd 100644
--- a/libbsd_waf.py
+++ b/libbsd_waf.py
@@ -465,6 +465,7 @@ def build(bld):
  'freebsd/lib/libc/stdlib/strtoimax.c',
  'freebsd/lib/libc/stdlib/strtonum.c',
  'freebsd/lib/libc/stdlib/strtoumax.c',
+ 'freebsd/lib/libc/string/strnstr.c',
  'freebsd/lib/libc/string/strsep.c',
  'freebsd/lib/libc/xdr/xdr.c',
  'freebsd/lib/libc/xdr/xdr_array.c',
-- 
2.7.4



___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel