core: move all include files except uv.h to uv/

Fixes https://github.com/libuv/libuv/issues/1161
PR-URL: https://github.com/libuv/libuv/pull/1429
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
Saúl Ibarra Corretgé 2017-07-22 17:50:57 +02:00
parent 5d336bd63f
commit d010030ad5
28 changed files with 72 additions and 69 deletions

View File

@ -17,7 +17,10 @@ ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(top_srcdir)/include \ AM_CPPFLAGS = -I$(top_srcdir)/include \
-I$(top_srcdir)/src -I$(top_srcdir)/src
include_HEADERS=include/uv.h include/uv-errno.h include/uv-threadpool.h include/uv-version.h include_HEADERS=include/uv.h
uvincludedir = $(includedir)/uv
uvinclude_HEADERS=include/uv/errno.h include/uv/threadpool.h include/uv/version.h
CLEANFILES = CLEANFILES =
@ -43,7 +46,7 @@ endif
if WINNT if WINNT
include_HEADERS += include/uv-win.h include/tree.h uvinclude_HEADERS += include/uv/win.h include/uv/tree.h
AM_CPPFLAGS += -I$(top_srcdir)/src/win \ AM_CPPFLAGS += -I$(top_srcdir)/src/win \
-DWIN32_LEAN_AND_MEAN \ -DWIN32_LEAN_AND_MEAN \
-D_WIN32_WINNT=0x0600 -D_WIN32_WINNT=0x0600
@ -80,7 +83,7 @@ libuv_la_SOURCES += src/win/async.c \
else # WINNT else # WINNT
include_HEADERS += include/uv-unix.h uvinclude_HEADERS += include/uv/unix.h
AM_CPPFLAGS += -I$(top_srcdir)/src/unix AM_CPPFLAGS += -I$(top_srcdir)/src/unix
libuv_la_SOURCES += src/unix/async.c \ libuv_la_SOURCES += src/unix/async.c \
src/unix/atomic-ops.h \ src/unix/atomic-ops.h \
@ -321,13 +324,13 @@ libuv_la_CFLAGS += -D_ALL_SOURCE \
-D_LINUX_SOURCE_COMPAT \ -D_LINUX_SOURCE_COMPAT \
-D_THREAD_SAFE \ -D_THREAD_SAFE \
-DHAVE_SYS_AHAFS_EVPRODS_H -DHAVE_SYS_AHAFS_EVPRODS_H
include_HEADERS += include/uv-aix.h uvinclude_HEADERS += include/uv/aix.h
libuv_la_SOURCES += src/unix/aix.c libuv_la_SOURCES += src/unix/aix.c
endif endif
if ANDROID if ANDROID
include_HEADERS += include/android-ifaddrs.h \ uvinclude_HEADERS += include/uv/android-ifaddrs.h \
include/pthread-barrier.h include/uv/pthread-barrier.h
libuv_la_SOURCES += src/unix/android-ifaddrs.c \ libuv_la_SOURCES += src/unix/android-ifaddrs.c \
src/unix/pthread-fixes.c \ src/unix/pthread-fixes.c \
src/unix/pthread-barrier.c src/unix/pthread-barrier.c
@ -347,8 +350,8 @@ libuv_la_SOURCES += src/unix/cygwin.c \
endif endif
if DARWIN if DARWIN
include_HEADERS += include/uv-darwin.h \ uvinclude_HEADERS += include/uv/darwin.h \
include/pthread-barrier.h include/uv/pthread-barrier.h
libuv_la_CFLAGS += -D_DARWIN_USE_64_BIT_INODE=1 libuv_la_CFLAGS += -D_DARWIN_USE_64_BIT_INODE=1
libuv_la_CFLAGS += -D_DARWIN_UNLIMITED_SELECT=1 libuv_la_CFLAGS += -D_DARWIN_UNLIMITED_SELECT=1
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \ libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
@ -362,7 +365,7 @@ test_run_tests_LDFLAGS += -lutil
endif endif
if DRAGONFLY if DRAGONFLY
include_HEADERS += include/uv-bsd.h uvinclude_HEADERS += include/uv/bsd.h
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \ libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
src/unix/freebsd.c \ src/unix/freebsd.c \
src/unix/kqueue.c \ src/unix/kqueue.c \
@ -371,7 +374,7 @@ test_run_tests_LDFLAGS += -lutil
endif endif
if FREEBSD if FREEBSD
include_HEADERS += include/uv-bsd.h uvinclude_HEADERS += include/uv/bsd.h
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \ libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
src/unix/freebsd.c \ src/unix/freebsd.c \
src/unix/kqueue.c \ src/unix/kqueue.c \
@ -380,7 +383,7 @@ test_run_tests_LDFLAGS += -lutil
endif endif
if LINUX if LINUX
include_HEADERS += include/uv-linux.h uvinclude_HEADERS += include/uv/linux.h
libuv_la_CFLAGS += -D_GNU_SOURCE libuv_la_CFLAGS += -D_GNU_SOURCE
libuv_la_SOURCES += src/unix/linux-core.c \ libuv_la_SOURCES += src/unix/linux-core.c \
src/unix/linux-inotify.c \ src/unix/linux-inotify.c \
@ -407,7 +410,7 @@ libuv_la_SOURCES += src/unix/cygwin.c \
endif endif
if NETBSD if NETBSD
include_HEADERS += include/uv-bsd.h uvinclude_HEADERS += include/uv/bsd.h
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \ libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
src/unix/kqueue.c \ src/unix/kqueue.c \
src/unix/netbsd.c \ src/unix/netbsd.c \
@ -416,7 +419,7 @@ test_run_tests_LDFLAGS += -lutil
endif endif
if OPENBSD if OPENBSD
include_HEADERS += include/uv-bsd.h uvinclude_HEADERS += include/uv/bsd.h
libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \ libuv_la_SOURCES += src/unix/bsd-ifaddrs.c \
src/unix/kqueue.c \ src/unix/kqueue.c \
src/unix/openbsd.c \ src/unix/openbsd.c \
@ -425,14 +428,14 @@ test_run_tests_LDFLAGS += -lutil
endif endif
if SUNOS if SUNOS
include_HEADERS += include/uv-sunos.h uvinclude_HEADERS += include/uv/sunos.h
libuv_la_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600 libuv_la_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=600
libuv_la_SOURCES += src/unix/no-proctitle.c \ libuv_la_SOURCES += src/unix/no-proctitle.c \
src/unix/sunos.c src/unix/sunos.c
endif endif
if OS390 if OS390
include_HEADERS += include/pthread-fixes.h include/pthread-barrier.h uvinclude_HEADERS += include/uv/pthread-barrier.h
libuv_la_CFLAGS += -D_UNIX03_THREADS \ libuv_la_CFLAGS += -D_UNIX03_THREADS \
-D_UNIX03_SOURCE \ -D_UNIX03_SOURCE \
-D_OPEN_SYS_IF_EXT=1 \ -D_OPEN_SYS_IF_EXT=1 \

View File

@ -26,8 +26,8 @@ SPARSE_FLAGS=${SPARSE_FLAGS:-"
"} "}
SOURCES=" SOURCES="
include/tree.h include/uv/tree.h
include/uv-unix.h include/uv/unix.h
include/uv.h include/uv.h
src/fs-poll.c src/fs-poll.c
src/inet.c src/inet.c
@ -181,7 +181,7 @@ AIX)
Darwin) Darwin)
SPARSE_FLAGS="$SPARSE_FLAGS -D__APPLE__=1" SPARSE_FLAGS="$SPARSE_FLAGS -D__APPLE__=1"
SOURCES="$SOURCES SOURCES="$SOURCES
include/uv-bsd.h include/uv/bsd.h
src/unix/darwin.c src/unix/darwin.c
src/unix/kqueue.c src/unix/kqueue.c
src/unix/fsevents.c" src/unix/fsevents.c"
@ -189,21 +189,21 @@ Darwin)
DragonFly) DragonFly)
SPARSE_FLAGS="$SPARSE_FLAGS -D__DragonFly__=1" SPARSE_FLAGS="$SPARSE_FLAGS -D__DragonFly__=1"
SOURCES="$SOURCES SOURCES="$SOURCES
include/uv-bsd.h include/uv/bsd.h
src/unix/kqueue.c src/unix/kqueue.c
src/unix/freebsd.c" src/unix/freebsd.c"
;; ;;
FreeBSD) FreeBSD)
SPARSE_FLAGS="$SPARSE_FLAGS -D__FreeBSD__=1" SPARSE_FLAGS="$SPARSE_FLAGS -D__FreeBSD__=1"
SOURCES="$SOURCES SOURCES="$SOURCES
include/uv-bsd.h include/uv/bsd.h
src/unix/kqueue.c src/unix/kqueue.c
src/unix/freebsd.c" src/unix/freebsd.c"
;; ;;
Linux) Linux)
SPARSE_FLAGS="$SPARSE_FLAGS -D__linux__=1" SPARSE_FLAGS="$SPARSE_FLAGS -D__linux__=1"
SOURCES="$SOURCES SOURCES="$SOURCES
include/uv-linux.h include/uv/linux.h
src/unix/linux-inotify.c src/unix/linux-inotify.c
src/unix/linux-core.c src/unix/linux-core.c
src/unix/linux-syscalls.c src/unix/linux-syscalls.c
@ -212,21 +212,21 @@ Linux)
NetBSD) NetBSD)
SPARSE_FLAGS="$SPARSE_FLAGS -D__NetBSD__=1" SPARSE_FLAGS="$SPARSE_FLAGS -D__NetBSD__=1"
SOURCES="$SOURCES SOURCES="$SOURCES
include/uv-bsd.h include/uv/bsd.h
src/unix/kqueue.c src/unix/kqueue.c
src/unix/netbsd.c" src/unix/netbsd.c"
;; ;;
OpenBSD) OpenBSD)
SPARSE_FLAGS="$SPARSE_FLAGS -D__OpenBSD__=1" SPARSE_FLAGS="$SPARSE_FLAGS -D__OpenBSD__=1"
SOURCES="$SOURCES SOURCES="$SOURCES
include/uv-bsd.h include/uv/bsd.h
src/unix/kqueue.c src/unix/kqueue.c
src/unix/openbsd.c" src/unix/openbsd.c"
;; ;;
SunOS) SunOS)
SPARSE_FLAGS="$SPARSE_FLAGS -D__sun=1" SPARSE_FLAGS="$SPARSE_FLAGS -D__sun=1"
SOURCES="$SOURCES SOURCES="$SOURCES
include/uv-sunos.h include/uv/sunos.h
src/unix/sunos.c" src/unix/sunos.c"
;; ;;
esac esac

View File

@ -18,7 +18,7 @@ import sys
def get_libuv_version(): def get_libuv_version():
with open('../../include/uv-version.h') as f: with open('../../include/uv/version.h') as f:
data = f.read() data = f.read()
try: try:
m = re.search(r"""^#define UV_VERSION_MAJOR (\d+)$""", data, re.MULTILINE) m = re.search(r"""^#define UV_VERSION_MAJOR (\d+)$""", data, re.MULTILINE)

View File

@ -45,18 +45,18 @@ extern "C" {
# define UV_EXTERN /* nothing */ # define UV_EXTERN /* nothing */
#endif #endif
#include "uv-errno.h" #include "uv/errno.h"
#include "uv-version.h" #include "uv/version.h"
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>
#if defined(_WIN32) #if defined(_WIN32)
# include "uv-win.h" # include "uv/win.h"
# if !defined(BUILDING_UV_SHARED) # if !defined(BUILDING_UV_SHARED)
# include "io.h" /* this header is not correct in a shared library environment */ # include "io.h" /* this header is not correct in a shared library environment */
# endif # endif
#else #else
# include "uv-unix.h" # include "uv/unix.h"
#endif #endif
/* Expand this list if necessary. */ /* Expand this list if necessary. */

View File

@ -42,30 +42,30 @@
#include <pthread.h> #include <pthread.h>
#include <signal.h> #include <signal.h>
#include "uv-threadpool.h" #include "uv/threadpool.h"
#if defined(__linux__) #if defined(__linux__)
# include "uv-linux.h" # include "uv/linux.h"
#elif defined (__MVS__) #elif defined (__MVS__)
# include "uv-os390.h" # include "uv/os390.h"
#elif defined(_AIX) #elif defined(_AIX)
# include "uv-aix.h" # include "uv/aix.h"
#elif defined(__sun) #elif defined(__sun)
# include "uv-sunos.h" # include "uv/sunos.h"
#elif defined(__APPLE__) #elif defined(__APPLE__)
# include "uv-darwin.h" # include "uv/darwin.h"
#elif defined(__DragonFly__) || \ #elif defined(__DragonFly__) || \
defined(__FreeBSD__) || \ defined(__FreeBSD__) || \
defined(__FreeBSD_kernel__) || \ defined(__FreeBSD_kernel__) || \
defined(__OpenBSD__) || \ defined(__OpenBSD__) || \
defined(__NetBSD__) defined(__NetBSD__)
# include "uv-bsd.h" # include "uv/bsd.h"
#elif defined(__CYGWIN__) || defined(__MSYS__) #elif defined(__CYGWIN__) || defined(__MSYS__)
# include "uv-posix.h" # include "uv/posix.h"
#endif #endif
#ifndef PTHREAD_BARRIER_SERIAL_THREAD #ifndef PTHREAD_BARRIER_SERIAL_THREAD
# include "pthread-barrier.h" # include "uv/pthread-barrier.h"
#endif #endif
#ifndef NI_MAXHOST #ifndef NI_MAXHOST

View File

@ -41,8 +41,8 @@ typedef intptr_t ssize_t;
#include <stdint.h> #include <stdint.h>
#include "tree.h" #include "uv/tree.h"
#include "uv-threadpool.h" #include "uv/threadpool.h"
#define MAX_PIPENAME_LEN 256 #define MAX_PIPENAME_LEN 256

View File

@ -49,11 +49,11 @@ Section "Files" SecInstall
SetOutPath "$INSTDIR\include" SetOutPath "$INSTDIR\include"
File "include\uv.h" File "include\uv.h"
File "include\uv-errno.h" File "include\uv\errno.h"
File "include\uv-threadpool.h" File "include\uv\threadpool.h"
File "include\uv-version.h" File "include\uv\version.h"
File "include\uv-win.h" File "include\uv\win.h"
File "include\tree.h" File "include\uv\tree.h"
WriteUninstaller "$INSTDIR\Uninstall.exe" WriteUninstaller "$INSTDIR\Uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "DisplayName" "libuv-${ARCH}-${VERSION}" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libuv-${ARCH}-${VERSION}" "DisplayName" "libuv-${ARCH}-${VERSION}"
@ -73,11 +73,11 @@ Section "Uninstall"
Delete "$INSTDIR\README.md" Delete "$INSTDIR\README.md"
Delete "$INSTDIR\include\uv.h" Delete "$INSTDIR\include\uv.h"
Delete "$INSTDIR\include\uv-errno.h" Delete "$INSTDIR\include\uv\errno.h"
Delete "$INSTDIR\include\uv-threadpool.h" Delete "$INSTDIR\include\uv\threadpool.h"
Delete "$INSTDIR\include\uv-version.h" Delete "$INSTDIR\include\uv\version.h"
Delete "$INSTDIR\include\uv-win.h" Delete "$INSTDIR\include\uv\win.h"
Delete "$INSTDIR\include\tree.h" Delete "$INSTDIR\include\uv\tree.h"
Delete "$INSTDIR\Uninstall.exe" Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR" RMDir "$INSTDIR"

View File

@ -23,7 +23,7 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "android-ifaddrs.h" #include "uv/android-ifaddrs.h"
#include "uv-common.h" #include "uv-common.h"
#include <string.h> #include <string.h>

View File

@ -51,7 +51,7 @@
#ifdef HAVE_IFADDRS_H #ifdef HAVE_IFADDRS_H
# if defined(__ANDROID__) # if defined(__ANDROID__)
# include "android-ifaddrs.h" # include "uv/android-ifaddrs.h"
# else # else
# include <ifaddrs.h> # include <ifaddrs.h>
# endif # endif

View File

@ -19,7 +19,7 @@
*/ */
#include "uv.h" #include "uv.h"
#include "tree.h" #include "uv/tree.h"
#include "internal.h" #include "internal.h"
#include <stdint.h> #include <stdint.h>

View File

@ -20,7 +20,7 @@
*/ */
#include "uv.h" #include "uv.h"
#include "tree.h" #include "uv/tree.h"
#include "internal.h" #include "internal.h"
#include "heap-inl.h" #include "heap-inl.h"
#include <stdlib.h> #include <stdlib.h>

View File

@ -13,7 +13,7 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
#include "pthread-barrier.h" #include "uv/pthread-barrier.h"
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>

View File

@ -33,7 +33,7 @@
#include <stdint.h> #include <stdint.h>
#include "uv.h" #include "uv.h"
#include "tree.h" #include "uv/tree.h"
#include "queue.h" #include "queue.h"

View File

@ -25,7 +25,7 @@
#include "uv.h" #include "uv.h"
#include "../uv-common.h" #include "../uv-common.h"
#include "tree.h" #include "uv/tree.h"
#include "winapi.h" #include "winapi.h"
#include "winsock.h" #include "winsock.h"

24
uv.gyp
View File

@ -69,10 +69,10 @@
'sources': [ 'sources': [
'common.gypi', 'common.gypi',
'include/uv.h', 'include/uv.h',
'include/tree.h', 'include/uv/tree.h',
'include/uv-errno.h', 'include/uv/errno.h',
'include/uv-threadpool.h', 'include/uv/threadpool.h',
'include/uv-version.h', 'include/uv/version.h',
'src/fs-poll.c', 'src/fs-poll.c',
'src/heap-inl.h', 'src/heap-inl.h',
'src/inet.c', 'src/inet.c',
@ -91,7 +91,7 @@
'_GNU_SOURCE', '_GNU_SOURCE',
], ],
'sources': [ 'sources': [
'include/uv-win.h', 'include/uv/win.h',
'src/win/async.c', 'src/win/async.c',
'src/win/core.c', 'src/win/core.c',
'src/win/detect-wakeup.c', 'src/win/detect-wakeup.c',
@ -136,12 +136,12 @@
}, },
}, { # Not Windows i.e. POSIX }, { # Not Windows i.e. POSIX
'sources': [ 'sources': [
'include/uv-unix.h', 'include/uv/unix.h',
'include/uv-linux.h', 'include/uv/linux.h',
'include/uv-sunos.h', 'include/uv/sunos.h',
'include/uv-darwin.h', 'include/uv/darwin.h',
'include/uv-bsd.h', 'include/uv/bsd.h',
'include/uv-aix.h', 'include/uv/aix.h',
'src/unix/async.c', 'src/unix/async.c',
'src/unix/atomic-ops.h', 'src/unix/atomic-ops.h',
'src/unix/core.c', 'src/unix/core.c',
@ -189,7 +189,7 @@
['uv_library=="shared_library" and OS!="mac" and OS!="os390"', { ['uv_library=="shared_library" and OS!="mac" and OS!="os390"', {
# This will cause gyp to set soname # This will cause gyp to set soname
# Must correspond with UV_VERSION_MAJOR # Must correspond with UV_VERSION_MAJOR
# in include/uv-version.h # in include/uv/version.h
'product_extension': 'so.1', 'product_extension': 'so.1',
}], }],
], ],