Subject: inet_makeaddr(), u_long, _POSIX_SOURCE macro
To: None <tech-kern@netbsd.org>
From: None <a_grey_m@poczta.onet.pl>
List: tech-kern
Date: 01/22/2003 16:45:27
--_Part_2w4g3u.8s7o3v=_009096.dsovat
Content-Type: text/plain; charset="iso-8859-2"
Content-Transfer-Encoding: 8bit

hello

I meet a problem with headers (I check it in NetBSD 1.5.3 & 1.6).
When I do:
/*foo.h*/
#include 
#inclde 
void foo (void)
{
}
/*end*/
gcc -c -D_POSIX_SOURCE foo.c

I have a problem with u_long because it is not defined. I Iooked at this headers and found that:
/*arpa/inet.h*/
...
struct in_addr inet_makeaddr (u_long, u_long);
...

/*sys/types.h*/
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
typedef unsigned long u_long;
...
#endif

So when I -D_POSIX_SOURCE I dont have u_long
But why??? I check in X/OPEN Networking Servies, issue 4 and issue 5.2 and
there is
struct in_addr inet_makeaddr (in_addr_t, in_addr_t)
and in issue 6 there is not at all inet_makeaddr()
I checked a body of inet_makeaddr() in cvs (cvsweb.netbsd.org) and there is a casting inside this function, u_long->in_addr. So now I want to ask if anyone know why in NetBSD (and even in 1.6) there are such definitions, it make impossilble to use _POSIX_SOURCE or _XOPEN_SOURCE in programs. I look lately on OpenBSD 3.2 and found the same situation on the same files but on diffrent functions and with u_char and u_int. So mayby during compilation that two definition can`t be used??? Any sugestion???

regards
MariuszW




--------------r-e-k-l-a-m-a-----------------

Super tanie kwatery narciarskie.
Od 300 zł/osoba/tydzień
http://wycieczki.onet.pl
--_Part_2w4g3u.8s7o3v=_009096.dsovat
Content-Type: text/html; charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-2">
<META name=3D"GENERATOR" content=3D"onet.poczta">
</HEAD><BODY>
hello

I meet a problem with headers (I check it in NetBSD 1.5.3 & 1.6).
When I do:
/*foo.h*/
#include <sys/types.h>
#inclde <arpa/inet.h>
void foo (void)
{
}
/*end*/
gcc -c -D_POSIX_SOURCE foo.c

I have a problem with u_long because it is not defined. I Iooked at this headers and found that:
/*arpa/inet.h*/
...
struct in_addr inet_makeaddr (u_long, u_long);
...

/*sys/types.h*/
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
typedef unsigned long u_long;
...
#endif

So when I -D_POSIX_SOURCE I dont have u_long
But why??? I check in X/OPEN Networking Servies, issue 4 and issue 5.2 and
there is
struct in_addr inet_makeaddr (in_addr_t, in_addr_t)
and in issue 6 there is not at all inet_makeaddr()
I checked a body of inet_makeaddr() in cvs (cvsweb.netbsd.org) and there is a casting inside this function, u_long->in_addr. So now I want to ask if anyone know why in NetBSD (and even in 1.6) there are such definitions, it make impossilble to use _POSIX_SOURCE or _XOPEN_SOURCE in programs. I look lately on OpenBSD 3.2 and found the same situation on the same files but on diffrent functions and with u_char and u_int. So mayby during compilation that two definition can`t be used??? Any sugestion???

regards
MariuszW
<br><br>--------------r-e-k-l-a-m-a-----------------<br>
<br>
Super tanie kwatery narciarskie!
<br>
<a
href="http://wycieczki.onet.pl">
Od 300 zł / osoba / tydzień - Wycieczki.Onet.pl!</a>
</BODY></HTML>


--_Part_2w4g3u.8s7o3v=_009096.dsovat--