From 6ce8abeff8a93a7defcad963737eafc1fc7856c2 Mon Sep 17 00:00:00 2001 From: everHannes Date: Thu, 20 Aug 2015 13:51:12 +0200 Subject: [PATCH] move wincompat headers to include path and add to make install --- configure.ac | 2 +- include/Makefile.am | 12 +++++++++++- .../windows => include/catta/compat}/wincompat.h | 0 .../catta/compat/windows}/arpa/inet.h | 0 .../catta/compat/windows}/net/if.h | 0 .../catta/compat/windows}/netinet/in.h | 0 .../catta/compat/windows}/sys/ioctl.h | 0 .../catta/compat/windows}/sys/poll.h | 0 .../catta/compat/windows}/sys/select.h | 0 .../catta/compat/windows}/sys/socket.h | 0 .../catta/compat/windows}/sys/uio.h | 0 .../catta/compat/windows}/sys/utsname.h | 0 src/Makefile.am | 4 ++-- src/compat/windows/wincompat.c | 2 +- 14 files changed, 15 insertions(+), 5 deletions(-) rename {src/compat/windows => include/catta/compat}/wincompat.h (100%) rename {src/compat/windows/include => include/catta/compat/windows}/arpa/inet.h (100%) rename {src/compat/windows/include => include/catta/compat/windows}/net/if.h (100%) rename {src/compat/windows/include => include/catta/compat/windows}/netinet/in.h (100%) rename {src/compat/windows/include => include/catta/compat/windows}/sys/ioctl.h (100%) rename {src/compat/windows/include => include/catta/compat/windows}/sys/poll.h (100%) rename {src/compat/windows/include => include/catta/compat/windows}/sys/select.h (100%) rename {src/compat/windows/include => include/catta/compat/windows}/sys/socket.h (100%) rename {src/compat/windows/include => include/catta/compat/windows}/sys/uio.h (100%) rename {src/compat/windows/include => include/catta/compat/windows}/sys/utsname.h (100%) diff --git a/configure.ac b/configure.ac index d760f34..c5314af 100644 --- a/configure.ac +++ b/configure.ac @@ -59,7 +59,7 @@ fi AC_CHECK_DECL(_WIN32) AM_CONDITIONAL([WINDOWS], [ test "x$ac_cv_have_decl__WIN32" = "xyes" ]) if test "x$ac_cv_have_decl__WIN32" = "xyes" ; then - CPPFLAGS="$CPPFLAGS -I`pwd`/src/compat/windows/include" + CPPFLAGS="$CPPFLAGS -I`pwd`/include/compat/windows" fi AC_CHECK_MEMBER([struct in_pktinfo.ipi_spec_dst], AC_DEFINE([HAVE_IPI_SPEC_DST], [], [struct in_pktinfo has ipi_spec_dst member]), diff --git a/include/Makefile.am b/include/Makefile.am index 7951320..fae04ca 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -35,4 +35,14 @@ nobase_include_HEADERS = \ catta/log.h \ catta/rr.h \ catta/publish.h \ - catta/lookup.h + catta/lookup.h \ + catta/compat/wincompat.h \ + catta/compat/windows/arpa/inet.h \ + catta/compat/windows/net/if.h \ + catta/compat/windows/netinet/in.h \ + catta/compat/windows/sys/ioctl.h \ + catta/compat/windows/sys/poll.h \ + catta/compat/windows/sys/select.h \ + catta/compat/windows/sys/socket.h \ + catta/compat/windows/sys/uio.h \ + catta/compat/windows/sys/utsname.h diff --git a/src/compat/windows/wincompat.h b/include/catta/compat/wincompat.h similarity index 100% rename from src/compat/windows/wincompat.h rename to include/catta/compat/wincompat.h diff --git a/src/compat/windows/include/arpa/inet.h b/include/catta/compat/windows/arpa/inet.h similarity index 100% rename from src/compat/windows/include/arpa/inet.h rename to include/catta/compat/windows/arpa/inet.h diff --git a/src/compat/windows/include/net/if.h b/include/catta/compat/windows/net/if.h similarity index 100% rename from src/compat/windows/include/net/if.h rename to include/catta/compat/windows/net/if.h diff --git a/src/compat/windows/include/netinet/in.h b/include/catta/compat/windows/netinet/in.h similarity index 100% rename from src/compat/windows/include/netinet/in.h rename to include/catta/compat/windows/netinet/in.h diff --git a/src/compat/windows/include/sys/ioctl.h b/include/catta/compat/windows/sys/ioctl.h similarity index 100% rename from src/compat/windows/include/sys/ioctl.h rename to include/catta/compat/windows/sys/ioctl.h diff --git a/src/compat/windows/include/sys/poll.h b/include/catta/compat/windows/sys/poll.h similarity index 100% rename from src/compat/windows/include/sys/poll.h rename to include/catta/compat/windows/sys/poll.h diff --git a/src/compat/windows/include/sys/select.h b/include/catta/compat/windows/sys/select.h similarity index 100% rename from src/compat/windows/include/sys/select.h rename to include/catta/compat/windows/sys/select.h diff --git a/src/compat/windows/include/sys/socket.h b/include/catta/compat/windows/sys/socket.h similarity index 100% rename from src/compat/windows/include/sys/socket.h rename to include/catta/compat/windows/sys/socket.h diff --git a/src/compat/windows/include/sys/uio.h b/include/catta/compat/windows/sys/uio.h similarity index 100% rename from src/compat/windows/include/sys/uio.h rename to include/catta/compat/windows/sys/uio.h diff --git a/src/compat/windows/include/sys/utsname.h b/include/catta/compat/windows/sys/utsname.h similarity index 100% rename from src/compat/windows/include/sys/utsname.h rename to include/catta/compat/windows/sys/utsname.h diff --git a/src/Makefile.am b/src/Makefile.am index ea38339..b78e013 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -90,9 +90,9 @@ libcatta_la_LIBADD = $(AM_LDADD) $(PTHREAD_CFLAGS) $(PTHREAD_LIBS) libcatta_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBCATTA_VERSION_INFO) if WINDOWS +libcatta_la_CFLAGS += -I$(top_srcdir)/include/catta/compat/windows libcatta_la_SOURCES += \ - compat/windows/wincompat.c \ - compat/windows/wincompat.h + compat/windows/wincompat.c libcatta_la_LIBADD += -lws2_32 -liphlpapi libcatta_la_LDFLAGS += -no-undefined -Wl,--kill-at,--output-def=.libs/libcatta-0.def endif diff --git a/src/compat/windows/wincompat.c b/src/compat/windows/wincompat.c index 93a557e..b60eb8f 100644 --- a/src/compat/windows/wincompat.c +++ b/src/compat/windows/wincompat.c @@ -1,4 +1,4 @@ -#include "wincompat.h" +#include "catta/compat/wincompat.h" #include #include #include -- 2.39.5