[PATCH] add header dependencies to libnut.h

libnut.h uses types like size_t, uint64_t and off_t that are defined in other headers. This patch makes sure that these headers are included.

Clemens Ladisch wrote:
libnut.h uses types like size_t, uint64_t and off_t that are defined in other headers. This patch makes sure that these headers are included.
sys/types.h ?? lu -- Luca Barbato Gentoo/linux Gentoo/PPC http://dev.gentoo.org/~lu_zero

Clemens Ladisch wrote:
Luca Barbato wrote:
Clemens Ladisch wrote:
libnut.h uses types like size_t, uint64_t and off_t that are defined in other headers. This patch makes sure that these headers are included. sys/types.h ??
off_t
unistd.h maybe? lu -- Luca Barbato Gentoo/linux Gentoo/PPC http://dev.gentoo.org/~lu_zero

Luca Barbato wrote:
Clemens Ladisch wrote:
Luca Barbato wrote:
Clemens Ladisch wrote:
libnut.h uses types like size_t, uint64_t and off_t that are defined in other headers. This patch makes sure that these headers are included.
sys/types.h ??
off_t
unistd.h maybe?
Why would you want to use this? sys/types.h is just as portable (SUSv2) as unistd.h but doesn't pull in all the other functions. Regards, Clemens

On Mon, Jan 22, 2007 at 07:27:14PM +0100, Clemens Ladisch wrote:
Luca Barbato wrote:
Clemens Ladisch wrote:
Luca Barbato wrote:
Clemens Ladisch wrote:
libnut.h uses types like size_t, uint64_t and off_t that are defined in other headers. This patch makes sure that these headers are included.
sys/types.h ??
off_t
unistd.h maybe?
Why would you want to use this? sys/types.h is just as portable (SUSv2) as unistd.h but doesn't pull in all the other functions.
stdlib.h and stdint.h (or inttypes.h) will give all except off_t. It would be nice not to depend on posix headers, just C ones, but onfortunately C stupidly lacks off_t. I suppose sys/types.h is ok. Rich

Rich Felker wrote:
On Mon, Jan 22, 2007 at 07:27:14PM +0100, Clemens Ladisch wrote:
Luca Barbato wrote:
Clemens Ladisch wrote:
Luca Barbato wrote:
Clemens Ladisch wrote:
libnut.h uses types like size_t, uint64_t and off_t that are defined in other headers. This patch makes sure that these headers are included.
sys/types.h ??
off_t
unistd.h maybe?
Why would you want to use this? sys/types.h is just as portable (SUSv2) as unistd.h but doesn't pull in all the other functions.
stdlib.h and stdint.h (or inttypes.h) will give all except off_t. It would be nice not to depend on posix headers, just C ones, but onfortunately C stupidly lacks off_t. I suppose sys/types.h is ok.
nutlib.h doesn't need any of the functions from stdlib.h, so using stddef.h instead should be OK, too. Regards, Clemens

On Tue, Jan 23, 2007 at 08:29:34AM +0100, Clemens Ladisch wrote:
Rich Felker wrote:
On Mon, Jan 22, 2007 at 07:27:14PM +0100, Clemens Ladisch wrote:
Luca Barbato wrote:
Clemens Ladisch wrote:
Luca Barbato wrote:
Clemens Ladisch wrote: > libnut.h uses types like size_t, uint64_t and off_t that are defined in > other headers. This patch makes sure that these headers are included.
sys/types.h ??
off_t
unistd.h maybe?
Why would you want to use this? sys/types.h is just as portable (SUSv2) as unistd.h but doesn't pull in all the other functions.
stdlib.h and stdint.h (or inttypes.h) will give all except off_t. It would be nice not to depend on posix headers, just C ones, but onfortunately C stupidly lacks off_t. I suppose sys/types.h is ok.
nutlib.h doesn't need any of the functions from stdlib.h, so using stddef.h instead should be OK, too.
ermm yeah i meant stddef.h. sorry. rich

On Mon, Jan 22, 2007 at 01:12:37PM +0100, Clemens Ladisch wrote:
libnut.h uses types like size_t, uint64_t and off_t that are defined in other headers. This patch makes sure that these headers are included.
I wasn't sure what is the best approach for this. Rich, can you comment on this? - ods15
participants (4)
-
Clemens Ladisch
-
Luca Barbato
-
Oded Shimon
-
Rich Felker