Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-08-25 22:21:07 +0400
committerChristopher Faylor <me@cgf.cx>2003-08-25 22:21:07 +0400
commit4392d36cbb8ba8dae24eca82c445d807497d69ff (patch)
treedd61a5e7d55d5896a48a1ecb7676ec9ac5bf3657 /winsup/cygwin
parente98b6dbb6d8c3f7e3329090a76814fae0ba2ce0b (diff)
Throughout, change USE_CYGSERVER to USE_SERVER.
* Makefile.in (LIBSERVER): Define and use. * configure.in: Set LIBSERVER as appropriate. * environ.cc: Rename allow_daemon to allow_server. Only recognize when USE_SERVER is defined.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/Makefile.in5
-rw-r--r--winsup/cygwin/acconfig.h2
-rw-r--r--winsup/cygwin/config.h.in2
-rwxr-xr-xwinsup/cygwin/configure12
-rw-r--r--winsup/cygwin/configure.in7
-rw-r--r--winsup/cygwin/environ.cc8
-rw-r--r--winsup/cygwin/fhandler_tty.cc4
-rw-r--r--winsup/cygwin/fork.cc2
-rw-r--r--winsup/cygwin/shm.cc4
-rw-r--r--winsup/cygwin/tty.cc4
11 files changed, 39 insertions, 19 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f26544b17..121fbb62f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,11 @@
+2003-08-25 Christopher Faylor <cgf@redhat.com>
+
+ Throughout, change USE_CYGSERVER to USE_SERVER.
+ * Makefile.in (LIBSERVER): Define and use.
+ * configure.in: Set LIBSERVER as appropriate.
+ * environ.cc: Rename allow_daemon to allow_server. Only recognize when
+ USE_SERVER is defined.
+
2003-08-23 Christopher Faylor <cgf@redhat.com>
* syscalls.cc (_remove_r): Define.
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index 66e72cc58..6a54a1cc3 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -233,6 +233,7 @@ API_VER:=$(srcdir)/include/cygwin/version.h
PWD:=${shell pwd}
LIB_NAME:=$(PWD)/libcygwin.a
+LIBSERVER:=@LIBSERVER@
SUBLIBS:=$(PWD)/libpthread.a $(PWD)/libm.a $(PWD)/libc.a
EXTRALIBS:=libautomode.a libbinmode.a libtextmode.a
INSTOBJS:=automode.o binmode.o textmode.o
@@ -334,10 +335,10 @@ maintainer-clean realclean: clean
# Rule to build cygwin.dll
-$(TEST_DLL_NAME): $(LDSCRIPT) $(DLL_OFILES) $(DEF_FILE) $(DLL_IMPORTS) $(LIBC) $(LIBM) $(API_VER) Makefile winver_stamp
+$(TEST_DLL_NAME): $(LDSCRIPT) $(DLL_OFILES) $(DEF_FILE) $(DLL_IMPORTS) $(LIBSERVER) $(LIBC) $(LIBM) $(API_VER) Makefile winver_stamp
$(CXX) $(CXXFLAGS) $(nostdlib) -Wl,-T$(firstword $^) -Wl,--out-implib,cygdll.a -shared -o $@ \
-e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) version.o winver.o \
- $(MALLOC_OBJ) $(LIBM) $(LIBC) \
+ $(MALLOC_OBJ) $(LIBSERVER) $(LIBM) $(LIBC) \
-lgcc $(DLL_IMPORTS)
@ln -f $@ new-$(DLL_NAME)
diff --git a/winsup/cygwin/acconfig.h b/winsup/cygwin/acconfig.h
index 79e2651d3..36aee469e 100644
--- a/winsup/cygwin/acconfig.h
+++ b/winsup/cygwin/acconfig.h
@@ -17,4 +17,4 @@
#undef NEWVFORK
/* Define if using cygserver */
-#undef USE_CYGSERVER
+#undef USE_SERVER
diff --git a/winsup/cygwin/config.h.in b/winsup/cygwin/config.h.in
index d4f6269e0..b4d44672f 100644
--- a/winsup/cygwin/config.h.in
+++ b/winsup/cygwin/config.h.in
@@ -38,4 +38,4 @@
#undef NEWVFORK
/* Define if using cygserver */
-#undef USE_CYGSERVER
+#undef USE_SERVER
diff --git a/winsup/cygwin/configure b/winsup/cygwin/configure
index e2f22306c..3500fad38 100755
--- a/winsup/cygwin/configure
+++ b/winsup/cygwin/configure
@@ -1904,11 +1904,13 @@ fi
if test "${enable_server+set}" = set; then
enableval="$enable_server"
case "${enableval}" in
-yes) cat >> confdefs.h <<\EOF
-#define USE_CYGSERVER 1
+yes)
+ cat >> confdefs.h <<\EOF
+#define USE_SERVER 1
EOF
- ;;
-no) ;;
+
+ LIBSERVER='$(bupdir)/cygserver/libcygserver.a' ;;
+no) LIBSERVER=;;
esac
fi
@@ -1966,6 +1968,7 @@ esac
+
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
@@ -2132,6 +2135,7 @@ s%@CPP@%$CPP%g
s%@ALLOCA@%$ALLOCA%g
s%@SET_MAKE@%$SET_MAKE%g
s%@MALLOC_OFILES@%$MALLOC_OFILES%g
+s%@LIBSERVER@%$LIBSERVER%g
s%@DLL_ENTRY@%$DLL_ENTRY%g
s%@DEF_DLL_ENTRY@%$DEF_DLL_ENTRY%g
s%@CONFIG_DIR@%$CONFIG_DIR%g
diff --git a/winsup/cygwin/configure.in b/winsup/cygwin/configure.in
index 2c26d4d3b..c0ad97682 100644
--- a/winsup/cygwin/configure.in
+++ b/winsup/cygwin/configure.in
@@ -138,8 +138,10 @@ esac
AC_ARG_ENABLE(server,
[ --enable-server Build a cygwin DLL which can communicate with cygserver],
[case "${enableval}" in
-yes) AC_DEFINE(USE_CYGSERVER) ;;
-no) ;;
+yes)
+ AC_DEFINE(USE_SERVER)
+ LIBSERVER='$(bupdir)/cygserver/libcygserver.a' ;;
+no) LIBSERVER=;;
esac
])
@@ -192,6 +194,7 @@ case "$target_cpu" in
esac
AC_SUBST(MALLOC_OFILES)
+AC_SUBST(LIBSERVER)
AC_SUBST(DLL_ENTRY)
AC_SUBST(DEF_DLL_ENTRY)
AC_SUBST(ALLOCA)
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 58d880013..fba44ac6d 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -35,8 +35,10 @@ extern bool strip_title_path;
extern int pcheck_case;
extern int subauth_id;
bool reset_com = false;
-bool allow_daemon = false;
static bool envcache = true;
+#ifdef USE_SERVER
+extern bool allow_server;
+#endif
static char **lastenviron;
@@ -506,7 +508,9 @@ static struct parse_thing
{"binmode", {x: &binmode}, justset, NULL, {{O_TEXT}, {O_BINARY}}},
{"check_case", {func: &check_case_init}, isfunc, NULL, {{0}, {0}}},
{"codepage", {func: &codepage_init}, isfunc, NULL, {{0}, {0}}},
- {"daemon", {&allow_daemon}, justset, NULL, {{false}, {true}}},
+#ifdef USE_SERVER
+ {"server", {&allow_server}, justset, NULL, {{false}, {true}}},
+#endif
{"envcache", {&envcache}, justset, NULL, {{true}, {false}}},
{"error_start", {func: &error_start_init}, isfunc, NULL, {{0}, {0}}},
{"export", {&export_settings}, justset, NULL, {{false}, {true}}},
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 44eb21e6b..a3694ae9d 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -507,7 +507,7 @@ fhandler_tty_slave::open (path_conv *, int flags, mode_t)
HANDLE from_master_local, to_master_local;
-#ifdef USE_CYGSERVER
+#ifdef USE_SERVER
if (!wincap.has_security ()
|| cygserver_running == CYGSERVER_UNAVAIL
|| !cygserver_attach_tty (&from_master_local, &to_master_local))
@@ -589,7 +589,7 @@ int
fhandler_tty_slave::cygserver_attach_tty (LPHANDLE from_master_ptr,
LPHANDLE to_master_ptr)
{
-#ifndef USE_CYGSERVER
+#ifndef USE_SERVER
return 0;
#else
if (!from_master_ptr || !to_master_ptr)
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 01daec953..021b83250 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -298,7 +298,7 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
(void) ForceCloseHandle1 (fork_info->subproc_ready, subproc_ready);
(void) ForceCloseHandle1 (fork_info->forker_finished, forker_finished);
-#ifdef USE_CYGSERVER
+#ifdef USE_SERVER
if (fixup_shms_after_fork ())
api_fatal ("recreate_shm areas after fork failed");
#endif
diff --git a/winsup/cygwin/shm.cc b/winsup/cygwin/shm.cc
index 1221298d2..2fef656e9 100644
--- a/winsup/cygwin/shm.cc
+++ b/winsup/cygwin/shm.cc
@@ -12,7 +12,7 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
-#ifdef USE_CYGSERVER
+#ifdef USE_SERVER
#include <sys/types.h>
#include <assert.h>
@@ -690,4 +690,4 @@ client_request_shm::client_request_shm (const key_t key,
msglen (sizeof (_parameters.in));
}
-#endif /* USE_CYGSERVER */
+#endif /* USE_SERVER */
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc
index 4c3365d91..d972f0d82 100644
--- a/winsup/cygwin/tty.cc
+++ b/winsup/cygwin/tty.cc
@@ -407,13 +407,13 @@ tty::common_init (fhandler_pty_master *ptym)
*/
if (wincap.has_security ())
{
-#ifdef USE_CYGSERVER
+#ifdef USE_SERVER
if (cygserver_running == CYGSERVER_UNKNOWN)
cygserver_init ();
#endif
if (
-#ifdef USE_CYGSERVER
+#ifdef USE_SERVER
cygserver_running != CYGSERVER_OK &&
#endif
!SetKernelObjectSecurity (hMainProc,