Shoichi Sakon | 3 Aug 12:11 2015
Picon

problem in swscanf

Hi,

It seems there is a problem in swscanf.

Here is a test program.
----------------------------------------------------------
#include <stdio.h>
#include <wchar.h>
#define SIZE 100

main() {
        const wchar_t *ws = L"ab cd ef";
        wchar_t x[SIZE],y[SIZE],z[SIZE];
        int ret;

        ret = swscanf(ws, L"%3$l[ab] %2$ls %1$lc",x,y,z);
        wprintf(L"ret=%d x=%lc y=%ls z=%ls\n",ret,*x,y,z);
}
-----------------------------------------------------------

In case of l[], ls or lc format, it does not handle %n$ properly,
null character is not add, and/or return value is not correct.

I made an experimental patch to try to correct them.
Please take a look.

diff -u newlib/libc/stdio/vfwscanf.c.orig newlib/libc/stdio/vfwscanf.c
--- newlib/libc/stdio/vfwscanf.c.orig   2013-12-20 03:50:00.000000000 +0900
+++ newlib/libc/stdio/vfwscanf.c        2015-08-03 18:53:04.548889253 +0900
 <at>  <at>  -777,7 +777,7  <at>  <at> 
(Continue reading)

Julius Schmidt | 3 Aug 11:25 2015

Bug in openrisc __malloc_lock

I believe there is a bug in the openrisc implementation of __malloc_lock:
The lines
	restore = or1k_critical_begin();
	_or1k_malloc_lock_restore = restore;
are executed every time _malloc_lock is called. If __malloc_lock is called recursively then the
old value of restore will be forgotten and so interrupts will remain disabled even after the
required number of __malloc_unlock calls.

Am I missing something or should these lines be moved into the if() statement?

Julius Schmidt
Argon Design

Andre Vieira | 31 Jul 11:29 2015

[ARM][PATCH 3/3] Add MIN MAX macro to param header file.

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

   * libc/sys/arm/sys/param.h (MIN,MAX): Define.
Attachment (param_refactor_3.patch): text/x-patch, 697 bytes
Andre Vieira | 31 Jul 11:28 2015

[ARM][PATCH 2/3] Use machine header file for endianness configuration.

newlib/ChangeLog:
2015-07-28  Andre Vieira  <andre.simoesdiasvieira <at> 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.
Attachment (param_refactor_2.patch): text/x-patch, 3693 bytes
Andre Vieira | 31 Jul 11:28 2015

[ARM][PATCH 1/3] Use machine header file for param configuration.

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

   * libc/sys/arm/sys/param.h: Include machine/param.h
   (HZ, NOFILE, PATHSIZE): Define.
Attachment (param_refactor_1.patch): text/x-patch, 939 bytes
Andre Vieira | 31 Jul 11:28 2015

[ARM][PATCH 0/3] Refactor param.h and fix missing MIN MAX macro's

This series is aimed at refactoring ARM's overwritting sys/param.h and 
adding the missing MIN MAX macro definitions.
The missing MIN MAX macro definitions were reported by Martin on 
Launchpad (https://answers.launchpad.net/gcc-arm-embedded/+question/269177).
The refactoring will mimic the default <sys/param.h>'s structure to 
better reflect the differences between the two.

Andre Vieira(3):
Use machine header file for param configuration.
Use machine header file for endianness configuration.
Add MIN MAX macro to param header file.

Frank Ch. Eigler | 30 Jul 15:36 2015

Re: Newlib Sources for HTTP download

Hi -

> If its possible for you, could you please make newlib sources
> available for downloading using http? Currently, its available using
> ftp only...

Added a ftp-> symlink under the newlib htdocs, so that
http://sourceware.org/newlib/ftp/ redirects to the ftp area.

- FChE

Nicholas Clifton | 30 Jul 10:29 2015
Picon

Ping: RFA: RL78: Add absolute symbol to RL78 linker scripts

Hi DJ,

   https://sourceware.org/ml/newlib/2015/msg00574.html

Ping ?

Cheers
   Nick

Sebastian Huber | 30 Jul 09:53 2015
Picon

[PATCH] [RTEMS] 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 <at> embedded-brains.de>

	* libc/sys/rtems/include/sys/lock.h (__LOCK_INIT_RECURSIVE): Use
	proper type.
---
 newlib/libc/sys/rtems/include/sys/lock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/sys/rtems/include/sys/lock.h b/newlib/libc/sys/rtems/include/sys/lock.h
index 49d8f8d..d2a7fb1 100644
--- a/newlib/libc/sys/rtems/include/sys/lock.h
+++ b/newlib/libc/sys/rtems/include/sys/lock.h
 <at>  <at>  -216,7 +216,7  <at>  <at>  typedef struct _Mutex_recursive_Control _LOCK_RECURSIVE_T;
     _qualifier _LOCK_T _designator = _MUTEX_INITIALIZER

 #define __LOCK_INIT_RECURSIVE(_qualifier, _designator) \
-    _qualifier _LOCK_T _designator = _MUTEX_RECURSIVE_INITIALIZER
+    _qualifier _LOCK_RECURSIVE_T _designator = _MUTEX_RECURSIVE_INITIALIZER

 #define __lock_init(_lock) _Mutex_Initialize(&_lock)
 #define __lock_acquire(_lock) _Mutex_Acquire(&_lock)
--

-- 
1.8.4.5

Sebastian Huber | 28 Jul 11:32 2015
Picon

[PATCH v2] [RTEMS] 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 <at> embedded-brains.de>

	* libc/sys/rtems/include/sys/lock.h: New.
---
 newlib/libc/sys/rtems/include/sys/lock.h | 235 +++++++++++++++++++++++++++++++
 1 file changed, 235 insertions(+)
 create mode 100644 newlib/libc/sys/rtems/include/sys/lock.h

diff --git a/newlib/libc/sys/rtems/include/sys/lock.h b/newlib/libc/sys/rtems/include/sys/lock.h
new file mode 100644
index 0000000..49d8f8d
--- /dev/null
(Continue reading)

Sebastian Huber | 27 Jul 14:45 2015
Picon

[PATCH] [RTEMS] 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.

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

	* libc/sys/rtems/include/sys/lock.h: New.
---
 newlib/libc/sys/rtems/include/sys/lock.h | 235 +++++++++++++++++++++++++++++++
 1 file changed, 235 insertions(+)
 create mode 100644 newlib/libc/sys/rtems/include/sys/lock.h

diff --git a/newlib/libc/sys/rtems/include/sys/lock.h b/newlib/libc/sys/rtems/include/sys/lock.h
new file mode 100644
index 0000000..4657f28
--- /dev/null
+++ b/newlib/libc/sys/rtems/include/sys/lock.h
 <at>  <at>  -0,0 +1,235  <at>  <at> 
(Continue reading)


Gmane