Commit 3b7efbbc authored by Marius Gerbershagen's avatar Marius Gerbershagen
Browse files

Merge branch 'fix/615' into 'develop'

s/TCP/ECL_TCP/ among preprocessor defines

Closes #615

See merge request embeddable-common-lisp/ecl!234
parents 6ff3b2b8 a1b2909b
......@@ -76,8 +76,8 @@
#define ECL_LIBATOMIC_OPS_H
/* Network streams */
#define TCP 1
#if defined(TCP) && (defined(_MSC_VER) || defined(mingw32))
#define ECL_TCP 1
#if defined(ECL_TCP) && (defined(_MSC_VER) || defined(mingw32))
# define ECL_WSOCK
#endif
......
......@@ -296,7 +296,7 @@ cl_shutdown(void)
#ifdef ENABLE_DLOPEN
ecl_library_close_all();
#endif
#ifdef TCP
#ifdef ECL_TCP
ecl_tcp_close_all();
#endif
}
......
......@@ -45,7 +45,7 @@ typedef struct {
#else
# define IF_MP(x) NULL
#endif
#ifdef TCP
#ifdef ECL_TCP
# define IF_TCP(x) x
#else
# define IF_TCP(x) NULL
......@@ -1323,13 +1323,13 @@ cl_symbols[] = {
{SYS_ "DISPLAY-PROFILE", SI_ORDINARY, IF_PROFILE(si_display_profile), -1, OBJNULL},
/* #endif PROFILE */
/* #ifdef TCP */
/* #ifdef ECL_TCP */
{SYS_ "*PROFILE-ARRAY*", SI_SPECIAL, NULL, -1, OBJNULL},
{SYS_ "OPEN-CLIENT-STREAM", SI_ORDINARY, IF_TCP(si_open_client_stream), 2, OBJNULL},
{SYS_ "OPEN-SERVER-STREAM", SI_ORDINARY, IF_TCP(si_open_server_stream), 1, OBJNULL},
{SYS_ "OPEN-UNIX-SOCKET-STREAM", SI_ORDINARY, IF_TCP(si_open_unix_socket_stream), 1, OBJNULL},
{SYS_ "LOOKUP-HOST-ENTRY", SI_ORDINARY, IF_TCP(si_lookup_host_entry), 1, OBJNULL},
/* #endif TCP */
/* #endif ECL_TCP */
{EXT_ "CATCH-SIGNAL", EXT_ORDINARY, si_catch_signal, -3, OBJNULL},
{EXT_ "GET-SIGNAL-HANDLER", EXT_ORDINARY, si_get_signal_handler, 1, OBJNULL},
......
......@@ -45,7 +45,7 @@ typedef struct {
#else
# define IF_MP(x) NULL
#endif
#ifdef TCP
#ifdef ECL_TCP
# define IF_TCP(x) x
#else
# define IF_TCP(x) NULL
......@@ -1323,13 +1323,13 @@ cl_symbols[] = {
{SYS_ "DISPLAY-PROFILE",IF_PROFILE("si_display_profile"),-1},
/* #endif PROFILE */
/* #ifdef TCP */
/* #ifdef ECL_TCP */
{SYS_ "*PROFILE-ARRAY*",NULL,-1},
{SYS_ "OPEN-CLIENT-STREAM",IF_TCP("si_open_client_stream"),2},
{SYS_ "OPEN-SERVER-STREAM",IF_TCP("si_open_server_stream"),1},
{SYS_ "OPEN-UNIX-SOCKET-STREAM",IF_TCP("si_open_unix_socket_stream"),1},
{SYS_ "LOOKUP-HOST-ENTRY",IF_TCP("si_lookup_host_entry"),1},
/* #endif TCP */
/* #endif ECL_TCP */
{EXT_ "CATCH-SIGNAL","si_catch_signal",-3},
{EXT_ "GET-SIGNAL-HANDLER","si_get_signal_handler",1},
......
......@@ -9951,7 +9951,7 @@ LSP_FEATURES="(cons :builtin-sockets ${LSP_FEATURES})"
fi
if test "${with_tcp}" = "yes"; then
$as_echo "#define TCP 1" >>confdefs.h
$as_echo "#define ECL_TCP 1" >>confdefs.h
EXTRA_OBJS="${EXTRA_OBJS} tcp.${OBJEXT}"
......
......@@ -833,7 +833,7 @@ if test "${with_tcp}" = "builtin"; then
with_tcp=yes
fi
if test "${with_tcp}" = "yes"; then
AC_DEFINE(TCP, [1], [Network streams])
AC_DEFINE(ECL_TCP, [1], [Network streams])
EXTRA_OBJS="${EXTRA_OBJS} tcp.${OBJEXT}"
ECL_ADD_LISP_MODULE([sockets])
LIBS="${LIBS} ${TCPLIBS}"
......
......@@ -637,7 +637,7 @@
#undef STDC_HEADERS
/* Network streams */
#undef TCP
#undef ECL_TCP
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
......
......@@ -88,8 +88,8 @@
#undef ECL_LIBATOMIC_OPS_H
/* Network streams */
#undef TCP
#if defined(TCP) && defined(ECL_MS_WINDOWS_HOST)
#undef ECL_TCP
#if defined(ECL_TCP) && defined(ECL_MS_WINDOWS_HOST)
# define ECL_WSOCK
#endif
......
......@@ -1753,7 +1753,7 @@ extern ECL_API cl_object mp_compare_and_swap_symbol_plist(cl_object x, cl_object
/* tcp.c */
#ifdef TCP
#ifdef ECL_TCP
extern ECL_API cl_object si_open_client_stream(cl_object host, cl_object port);
extern ECL_API cl_object si_open_server_stream(cl_object port);
extern ECL_API cl_object si_open_unix_socket_stream(cl_object path);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment