getdomainname prototype definition in admin/acinclude.m4.in

Benjamin Reed ranger at befunk.com
Thu Jul 17 18:27:10 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thiago Macieira wrote:

> revision 2.371 of admin/acinclude.m4.in changed the definition of the 
> getdomainname prototype:
> -               [int getdomainname (char *, int)],
> +               [int getdomainname (char *, size_t)],
> 
> I've done some searching on the Internet and it seems to me that only Linux 
> uses size_t (which is unsigned) as the second parameter. Every other system I 
> found seemed to use int (Google searches for FreeBSD, OpenBSD, Solaris, HP-UX 
> and AIX).
> 
> While there isn't much of a problem considering this is a C function, the 
> problem arises when #include <config.h> is the first include in a file -- 
> which is the recommended behaviour according to autoconf. When that happens, 
> the compiler chokes due to the fact that size_t is an undefined type: neither 
> stddef.h nor sys/types.h has been included yet.
> 
> So, as far as I can see, there are two solutions:
> 1) revert the prototype back to int
> 2) #include <stddef.h> inside config.h
> 
> Any thoughts?

MacOSX uses size_t as well (which on OSX is unsized int I believe). 
Sounds like the test needs to be changed to something that understands 
either...  :(

- -- 
Benjamin Reed a.k.a. Ranger Rick -- http://ranger.befunk.com/
"Just try to imagine a world where e-mails are sent by your brain
before they are written, and are ready before they arrive by people
you have never even met in countries you have never even heard of!"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/FtxxUu+jZtP2Zf4RAjn0AJoCz5/Tf+JAQNjTSq/WKr/PMaXo0wCcDuvp
uLt9tDR6pilLWFXHf5fJ0Rc=
=iC/Z
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list