[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gphoto
Subject:    Re: [gphoto] malloc() is prototyped in stdlib.h on FreeBSD
From:       Kenneth Stailey <kstailey () yahoo ! com>
Date:       2001-12-27 2:06:59
[Download RAW message or body]


--- Hubert Figuiere <hfiguiere@teaser.fr> wrote:
> According to Kenneth Stailey <kstailey@yahoo.com>:
> 
> > ANSI specifications say to prototype malloc() in <stdlib.h> but not all
> systems
> > are up to spec.
> 
> In Linux, not including <stdlib.h> seems to be harmless. But that does
> not violate the standard.
> > 
> > Thanks for checking in my patch.  Can you get the byteorder.m4 one in too?
> 
> For the byteorder stuff I'm a little more upset.

Well the truth is that FreeBSD documentation suggests using <sys/param.h> to
get hton and ntoh funtions:

BYTEORDER(3)           FreeBSD Library Functions Manual           BYTEORDER(3)

NAME
     htonl, htons, ntohl, ntohs - convert values between host and network byte
     order

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <sys/param.h>

     u_long
     htonl(u_long hostlong);

[...]



__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic