libnetworking: function declaration for accept

Thomas Doerfler Thomas.Doerfler at embedded-brains.de
Tue Dec 11 15:04:04 UTC 2007


Hi,

during a code review session we just came across an obscure divergence
between the function declaration of "accept" and the real implementation:

in cpukit/libnetworking/sys/socket.h, we have the following declaration
(encapsulated in "#ifndef _KERNEL"):

int    accept(int, struct sockaddr * __restrict, socklen_t * __restrict);

with socklen_t being mapped to a uint32_t.

On the other hand, we have the implementation in
cpukit/libnetworking/rtems/rtems_syscall.c:

int accept (int s, struct sockaddr *name, int *namelen)

The last argument obviously has a different signedness.

The declaration seems to comform to the one available under Linux.

Any comments?
- Shall I check/modify the accept implementation?
- Which other rtems_syscall functions might need a closer inspection?
- How can we make sure, that function declaration and implementation are
closer together? Or, other question: Any idea why the declarations are
encapsulated in "#ifndef _KERNEL"?

wkr,
Thomas.

-- 
--------------------------------------------
embedded brains GmbH
Thomas Doerfler           Obere Lagerstr. 30
D-82178 Puchheim          Germany
Tel. : +49-89-18 90 80 79-2
Fax  : +49-89-18 90 80 79-9
email: Thomas.Doerfler at embedded-brains.de
PGP public key available on request

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



More information about the users mailing list