text: On 03/21/2010 01:45 PM, Matthias Bolte wrote: > 2010. Well, we're getting closer. But I'd really like to avoid making all clients of <winsock2.h> make an adjustment; it seems like it should still be possible to make _just_ <unistd.h> have the smarts necessary. Here's some pseudocode I'm currently thinking about (patch to come up later...) #if [_WINSOCK2_H and !witness] /* Someone has included <winsock2.h> prior to <unistd.h> - let it run to completion, without declaring any of our overrides; to be portable, the user will have to later include <unistd.h> if they plan on using gethostname. */ # include_next <unistd.h> # define witness #else /* Normal invocation */ # if !defined _GL_UNISTD_H # include_next <unistd.h> /* Include everything that declares something that we might want to override */ # define _GL_INCLUDING_WINSOCK2_H # include <winsock2.h> # undef _GL_INCLUDING_WINSOCK2_H /* Split include guard. */ # if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H # define _GL_UNISTD_H /* Declare our overrides. */ # endif /* _GL_UNISTD_H/_GL_INCLUDING_WINSOCK2_H */ # endif /* _GL_UNISTD_H */ #endif /*_WINSOCK2_H */ -- Eric Blake address@hidden +1-801-349-2682 Libvirt virtualization library
  signature.asc
  Description: OpenPGP digital signature