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.
This commit is contained in:
		| @@ -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. | ||||
|   | ||||
| @@ -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) | ||||
|  | ||||
|   | ||||
| @@ -17,4 +17,4 @@ | ||||
| #undef NEWVFORK | ||||
|  | ||||
| /* Define if using cygserver */ | ||||
| #undef USE_CYGSERVER | ||||
| #undef USE_SERVER | ||||
|   | ||||
| @@ -38,4 +38,4 @@ | ||||
| #undef NEWVFORK | ||||
|  | ||||
| /* Define if using cygserver */ | ||||
| #undef USE_CYGSERVER | ||||
| #undef USE_SERVER | ||||
|   | ||||
							
								
								
									
										12
									
								
								winsup/cygwin/configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								winsup/cygwin/configure
									
									
									
									
										vendored
									
									
								
							| @@ -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 | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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}}}, | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 */ | ||||
|   | ||||
| @@ -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, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user