Re: 18/22 Misc headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 07, 2007 at 11:43:46AM +0000, Richard W.M. Jones wrote:
> Miscellaneous changes to headers.  The important one is that if 
> <winsock2.h> is available then that replaces all of the usual socket- 
> and network database-related headers (which are not available in 
> Windows).  Thus you end up with code like this:
> 
> #ifndef HAVE_WINSOCK2_H
> #include <sys/socket.h>
> #include <netdb.h>
> #include <netinet/in.h>
> #else
> #include <winsock2.h>
> #endif

  I looked quickly how it's dome in libxml2, there we use _WINSOCKAPI_
as the define to select the Windows networking API (apparently a
standard define of Microsoft) and we have a wsockcompat.h which 
does some remapping of the BSD interfaces onto winsock.h/winsock2.h .
Lets keep things simple as you did with gnulib and if people want to
compile on the various MS compilers, well we take patches :-)

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]