getdomainname prototype definition in admin/

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

Hash: SHA1

Thiago Macieira wrote:

> revision 2.371 of admin/ 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 --
"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!"
Version: GnuPG v1.2.2 (Darwin)
Comment: Using GnuPG with Mozilla -


More information about the kde-core-devel mailing list