On Mon, Dec 2, 2013 at 2:20 PM, Alin Serdean <aserd...@cloudbasesolutions.com> wrote: > Hey, > > Continuing patches for the windows build. > > The next problem that we are facing is that the include_next directive is > missing from the VStudio compiler. > > The affected files will be: > include/linux/types.h > #include <sys/types.h> > #ifndef _WIN32 > #include_next <linux/types.h> > #endif
Since linux/types.h is only included from linux specific source files, we would be excluding those source files from getting compiled in windows build. I see linux/types.h being included only in the datapath directory(which is linux datapath), lib/dpif-linux.c and lib/netdev-linux.c. If you see lib/automake.mk, the dpif-linux.c and netdev-linux.c are only included when LINUX_DATAPATH is defined. So I don't see this being a problem for windows build. As an example template, we can have something like this in lib/automake.mk +if WIN32 +lib_libopenvswitch_a_SOURCES += \ + lib/dpif-windows.c \ + lib/dpif-windows.h +endif > > lib/string.h > #ifdef _WIN32 > #include <../include/string.h> > #else > #include_next <string.h> > #endif > Are you suggesting that we copy windows' string.h into the "include" directory? If so, we should instead put it in "include/windows" directory and include that directory only when we are building on windows. ex: --- a/Makefile.am +++ b/Makefile.am @@ -10,6 +10,11 @@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = datapath AM_CPPFLAGS = $(SSL_CFLAGS) + +if WIN32 +AM_CPPFLAGS += -I $(top_srcdir)/include/windows +endif + AM_CPPFLAGS += -I $(top_srcdir)/include AM_CPPFLAGS += -I $(top_srcdir)/lib AM_CPPFLAGS += -I $(top_builddir)/lib Ben probably has better ideas here. > Does anyone else have a better suggestion? > > Kind regards, > Alin. > _______________________________________________ > dev mailing list > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev