Mail Archives: cygwin/2003/02/26/08:12:13
Now i almost pinpointed my problem to:
108: struct sockaddr_irda {
109: sa_family_t sir_family; /* AF_IRDA */
110: __u8 sir_lsap_sel; /* LSAP selector */
111: __u32 sir_addr; /* Device address */
112: char sir_name[25]; /* Usually <service>:IrDA:TinyTP
*/
113: };
This snippet don't compile in Cygwin with the following output:
/usr/include/linux/irda.h:109: parse error before "sa_family_t"
/usr/include/linux/irda.h:113: parse error before '}' token
The snippet is from the headerfile, irda.h. And sa_family_t is formerly
defined in sockaddr.h:
/* POSIX.1g specifies this type name for the `sa_family' member. */
typedef unsigned short int sa_family_t;
/* This macro is used to declare the initial common members
of the data types used for socket addresses, `struct sockaddr',
`struct sockaddr_in', `struct sockaddr_un', etc. */
#define __SOCKADDR_COMMON(sa_prefix) \
sa_family_t sa_prefix##family
Any ideas?
Regards Daniel
> -----Original Message-----
> From: Ohgren, Daniel [Non-Employee/0454]
> Sent: den 24 februari 2003 14:24
> To: 'cygwin AT cygwin DOT com'
> Subject: Compiling irda socket code
>
> Hello,
>
> I've looked for this answer on many forums without luck. I'm trying to
> compile som code written and compiled on a linux-machine and need to
> compile it in Cygwin to port it on a microprocessor. I now that Cygwin is
> _not_ Linux, but as C is an 'international' language it should work...?
>
> But i get the following compiling with -traditional flag:
>
> $ gcc -traditional irrec.c
> /usr/include/asm/ioctl.h:56: warning: "_IO" redefined
> /usr/include/asm/ioctl.h:57: warning: "_IOR" redefined
> /usr/include/asm/ioctl.h:58: warning: "_IOW" redefined
> /usr/include/asm/ioctl.h:69: warning: "IOC_IN" redefined
> /usr/include/asm/ioctl.h:70: warning: "IOC_OUT" redefined
> /usr/include/asm/ioctls.h:34: warning: "FIONREAD" redefined
> /usr/include/asm/ioctls.h:41: warning: "FIONBIO" redefined
> /usr/include/asm/ioctls.h:55: warning: "FIOASYNC" redefined
> /usr/include/bits/ioctls.h:34: warning: "SIOCGIFCONF" redefined
> /usr/include/bits/ioctls.h:35: warning: "SIOCGIFFLAGS" redefined
> /usr/include/bits/ioctls.h:37: warning: "SIOCGIFADDR" redefined
> /usr/include/bits/ioctls.h:41: warning: "SIOCGIFBRDADDR" redefined
> /usr/include/bits/ioctls.h:43: warning: "SIOCGIFNETMASK" redefined
> /usr/include/bits/ioctls.h:45: warning: "SIOCGIFMETRIC" redefined
> /usr/include/bits/ioctls.h:49: warning: "SIOCGIFMTU" redefined
> /usr/include/bits/ioctls.h:54: warning: "SIOCGIFHWADDR" redefined
> /usr/include/bits/confname.h:200: macro or #include recursion too deep
> /usr/include/sys/features.h:82: warning: "_POSIX_SAVED_IDS" redefined
> /usr/include/sys/features.h:83: warning: "_POSIX_VERSION" redefined
> /usr/include/sys/signal.h:168: #error You need the winsup sources or a
> cygwin in
> stallation to compile the cygwin version of newlib.
> irrec.c:36: macro or #include recursion too deep
>
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -