]> sourceware.org Git - newlib-cygwin.git/commitdiff
* Makefile.in: Only build testsuite directory on first 'make check'.
authorChristopher Faylor <me@cgf.cx>
Wed, 24 Oct 2001 21:56:54 +0000 (21:56 +0000)
committerChristopher Faylor <me@cgf.cx>
Wed, 24 Oct 2001 21:56:54 +0000 (21:56 +0000)
* configure.in: Remove testsuite from SUBDIRS.
* configure: Regenerate.

13 files changed:
winsup/ChangeLog
winsup/Makefile.in
winsup/configure
winsup/configure.in
winsup/cygwin/cygheap.h
winsup/cygwin/external.cc
winsup/cygwin/fhandler_console.cc
winsup/cygwin/include/sys/cygwin.h
winsup/cygwin/path.cc
winsup/cygwin/shared.cc
winsup/cygwin/shared_info.h
winsup/utils/Makefile.in
winsup/utils/mount.cc

index b80d149525d3483613d2159e5ea17ac470eb2c01..da56fc4dd3af900346d3570f15127b279e94d6b2 100644 (file)
@@ -1,3 +1,9 @@
+2001-10-24  Christopher Faylor  <cgf@redhat.com>
+
+       * Makefile.in: Only build testsuite directory on first 'make check'.
+       * configure.in: Remove testsuite from SUBDIRS.
+       * configure: Regenerate.
+
 2001-10-12  Christopher Faylor  <cgf@redhat.com>
 
        * Makefile.in: Add -nostdinc to CXXFLAGS.
index 2bc1c419c38f88c5fd4f282988edd12b3f2d9874..c1e686fd336271436d1bfd70947cf736f3a620dd 100644 (file)
@@ -36,7 +36,7 @@ datadir:=@datadir@
 infodir:=@infodir@
 includedir:=@includedir@
 
-SUBDIRS=@SUBDIRS@
+SUBDIRS=@SUBDIRS@ testsuite
 INSTALL_SUBDIRS=${patsubst %,install_%,$(SUBDIRS)}
 CLEAN_SUBDIRS=${patsubst %,clean_%,$(SUBDIRS)}
 
@@ -66,13 +66,19 @@ install-info:
 info:
 
 $(SUBDIRS):
-       @$(MAKE) -C $@ all
+       @if cd $@ 2>/dev/null; then \
+           $(MAKE) all; \
+       fi || exit 0
 
 $(INSTALL_SUBDIRS):
-       @$(MAKE) -C ${patsubst install_%,%,$@} install
+       @if cd ${patsubst install_%,%,$@} 2>/dev/null; then \
+           make install; \
+       fi || exit 0
 
 $(CLEAN_SUBDIRS):
-       @$(MAKE) -C ${patsubst clean_%,%,$@} clean
+       @if cd ${patsubst clean_%,%,$@} 2>/dev/null; then \
+           make install; \
+       fi || exit 0
 
 .PRECIOUS: Makefile
 
@@ -82,5 +88,15 @@ Makefile: Makefile.in $(srcdir)/configure.in config.status
 config.status: configure
        $(SHELL) config.status --recheck
 
-check:
-       @$(MAKE) -C testsuite check
+check: cygwin
+       @if [ -d testsuite ]; then \
+           cd testsuite; \
+       else \
+           mkdir testsuite; \
+           cd testsuite; \
+           sed -n -e '1,/^done/{' -e 's%/cygwin%/testsuite%g; ' -e 'p; }'  ../cygwin/config.status > config.status; \
+           chmod a+x config.status; \
+           sh ./config.status --recheck; \
+           sh ./config.status; \
+       fi; \
+       $(MAKE) check
index 2aac72dfea3948d498f3cba4359f5126d4424140..f7bd3507711155fb0c9668dd164c2aa8487921dd 100755 (executable)
@@ -922,7 +922,7 @@ case "$with_cross_host" in
     test -d $srcdir/bz2lib && SUBDIRS="$SUBDIRS bz2lib"
     test -d $srcdir/cinstall && SUBDIRS="$SUBDIRS cinstall"
     test -d $srcdir/subauth && SUBDIRS="$SUBDIRS subauth"
-    SUBDIRS="$SUBDIRS utils doc testsuite"
+    SUBDIRS="$SUBDIRS utils doc"
     ;;
 esac
 
@@ -1121,7 +1121,7 @@ s%@CC@%$CC%g
 s%@CXX@%$CXX%g
 s%@subdirs@%$subdirs%g
 s%@SET_MAKE@%$SET_MAKE%g
-s%@SUBDIRS@%$SUBDIRS%g
+s%@SUBDIRS testsuite@%$SUBDIRS testsuite%g
 
 CEOF
 EOF
index eb1d33bac0546edc1afcbf5dbd9fb0fa296bda8b..71d2c34e6d052f48fb9b644a6f5b6b6482f1302a 100755 (executable)
@@ -72,7 +72,7 @@ case "$with_cross_host" in
     test -d $srcdir/bz2lib && SUBDIRS="$SUBDIRS bz2lib"
     test -d $srcdir/cinstall && SUBDIRS="$SUBDIRS cinstall"
     test -d $srcdir/subauth && SUBDIRS="$SUBDIRS subauth"
-    SUBDIRS="$SUBDIRS utils doc testsuite"
+    SUBDIRS="$SUBDIRS utils doc"
     ;;
 esac
 
index 7f0f04f117453b93fb8f2c741e8edf7ac5775e41..16f22c52d7c9df4962e9828597f8cc7acc37c23d 100644 (file)
@@ -165,6 +165,7 @@ struct init_cygheap
   HANDLE shared_h;
   HANDLE console_h;
   HANDLE etc_changed_h;
+  char *cygwin_regname;
   cwdstuff cwd;
   dtable fdtab;
 
index a4b81be923377b2d41b27f85b5dfc1ce13602898..5780647a20a9b83e8040c029cd58229cc884b95d 100644 (file)
@@ -11,6 +11,7 @@ Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
 details. */
 
 #include "winsup.h"
+#include <errno.h>
 #include "security.h"
 #include "fhandler.h"
 #include "sync.h"
@@ -20,6 +21,11 @@ details. */
 #include "shared_info.h"
 #include "cygwin_version.h"
 #include "perprocess.h"
+#include "cygerrno.h"
+#include "fhandler.h"
+#include "path.h"
+#include "dtable.h"
+#include "cygheap.h"
 
 static external_pinfo *
 fillout_pinfo (pid_t pid, int winpid)
@@ -175,6 +181,19 @@ cygwin_internal (cygwin_getinfo_types t, ...)
          return get_cygdrive_info (user, system, user_flags, system_flags);
        }
 
+      case CW_SET_CYGWIN_REGISTRY_NAME:
+       {
+#        define cr ((char *) arg)
+         if (check_null_empty_str_errno (cr))
+           return (DWORD) NULL;
+         cygheap->cygwin_regname = (char *) crealloc (cygheap->cygwin_regname,
+                                                      strlen (cr) + 1);
+         strcpy (cygheap->cygwin_regname, cr);
+      case CW_GET_CYGWIN_REGISTRY_NAME:
+         return (DWORD) cygheap->cygwin_regname;
+#        undef cr
+       }
+
       default:
        return (DWORD) -1;
     }
index a9b7bffe8f5cd9ffabcd0bdb841365775d64b52e..504d2457c09dfd0b49b36537313e18988fddd762 100644 (file)
@@ -104,7 +104,7 @@ get_tty_stuff (int flags = 0)
   if (shared_console_info)
     return shared_console_info;
 
-  shared_console_info = (tty_min *) open_shared (NULL, cygheap->console_h,
+  shared_console_info = (tty_min *) open_shared (NULL, 0, cygheap->console_h,
                                                 sizeof (*shared_console_info),
                                                 NULL);
   ProtectHandle (cygheap->console_h);
index 1d53f636bb87869f93a753371a1a584e231746b5..a4a8cf6994b6f56ff0b7f1b52b5e1781b052d75c 100644 (file)
@@ -64,7 +64,9 @@ typedef enum
     CW_GET_CYGDRIVE_PREFIXES,
     CW_GETPINFO_FULL,
     CW_INIT_EXCEPTIONS,
-    CW_GET_CYGDRIVE_INFO
+    CW_GET_CYGDRIVE_INFO,
+    CW_SET_CYGWIN_REGISTRY_NAME,
+    CW_GET_CYGWIN_REGISTRY_NAME
   } cygwin_getinfo_types;
 
 #define CW_NEXTPID     0x80000000      // or with pid to get next one
index 066ef2e30116a9e03332214384a4db874245b3c9..ad3008c081fe8f9a778f5082d6a532db29136f95 100644 (file)
@@ -107,6 +107,8 @@ struct symlink_info
 
 int pcheck_case = PCHECK_RELAXED; /* Determines the case check behaviour. */
 
+#define CYGWIN_REGNAME (cygheap->cygwin_regname ?: CYGWIN_INFO_CYGWIN_REGISTRY_NAME)
+
 /* Determine if path prefix matches current cygdrive */
 #define iscygdrive(path) \
   (path_prefix_p (mount_table->cygdrive, (path), mount_table->cygdrive_len))
@@ -1711,8 +1713,7 @@ mount_info::from_registry ()
 
   /* Then read mounts from system-wide mount table. */
   reg_key r1 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE",
-             CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
-             CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
+             CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
              CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
              NULL);
   read_mounts (r1);
@@ -1757,8 +1758,7 @@ mount_info::add_reg_mount (const char * native_path, const char * posix_path, un
     {
       /* reg_key for system mounts in HKEY_LOCAL_MACHINE. */
       reg_key reg_sys (HKEY_LOCAL_MACHINE, KEY_ALL_ACCESS, "SOFTWARE",
-                      CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
-                      CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
+                      CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
                       CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
                       NULL);
 
@@ -1806,8 +1806,7 @@ mount_info::del_reg_mount (const char * posix_path, unsigned flags)
       sys_mount_table_counter++;
       cygwin_shared->sys_mount_table_counter++;
       reg_key reg_sys (HKEY_LOCAL_MACHINE, KEY_ALL_ACCESS, "SOFTWARE",
-                      CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
-                      CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
+                      CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
                       CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
                       NULL);
       res = reg_sys.kill (posix_path);
@@ -1839,8 +1838,7 @@ mount_info::read_cygdrive_info_from_registry ()
 
       /* reg_key for system path prefix in HKEY_LOCAL_MACHINE.  */
       reg_key r2 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE",
-                CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
-                CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
+                CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
                 CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
                 NULL);
 
@@ -1890,8 +1888,7 @@ mount_info::write_cygdrive_info_to_registry (const char *cygdrive_prefix, unsign
   /* reg_key for user path prefix in HKEY_CURRENT_USER or system path prefix in
      HKEY_LOCAL_MACHINE.  */
   reg_key r (top, KEY_ALL_ACCESS, "SOFTWARE",
-            CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
-            CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
+            CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
             CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
             NULL);
 
@@ -1947,8 +1944,7 @@ mount_info::remove_cygdrive_info_from_registry (const char *cygdrive_prefix, uns
   /* reg_key for user path prefix in HKEY_CURRENT_USER or system path prefix in
      HKEY_LOCAL_MACHINE.  */
   reg_key r (top, KEY_ALL_ACCESS, "SOFTWARE",
-            CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
-            CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
+            CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
             CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
             NULL);
 
@@ -1980,8 +1976,7 @@ mount_info::get_cygdrive_info (char *user, char *system, char* user_flags,
 
   /* Get the system path prefix from HKEY_LOCAL_MACHINE. */
   reg_key r2 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE",
-             CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
-             CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
+             CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
              CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
              NULL);
   int res2 = r2.get_string (CYGWIN_INFO_CYGDRIVE_PREFIX, system, MAX_PATH, "");
index 7e155ebebce1b18e585066a668ffec0dc1de41b8..01584873e83e607ca3e7a748cc25840ab6661ce7 100644 (file)
@@ -55,7 +55,7 @@ shared_name (const char *str, int num)
 }
 
 void * __stdcall
-open_shared (const char *name, HANDLE &shared_h, DWORD size, void *addr)
+open_shared (const char *name, int n, HANDLE &shared_h, DWORD size, void *addr)
 {
   void *shared;
 
@@ -66,7 +66,7 @@ open_shared (const char *name, HANDLE &shared_h, DWORD size, void *addr)
        mapname = NULL;
       else
        {
-         mapname = shared_name (name, 0);
+         mapname = shared_name (name, n);
          shared_h = OpenFileMappingA (FILE_MAP_READ | FILE_MAP_WRITE,
                                       TRUE, mapname);
        }
@@ -127,6 +127,7 @@ memory_init ()
   /* Initialize general shared memory */
   HANDLE shared_h = cygheap ? cygheap->shared_h : NULL;
   cygwin_shared = (shared_info *) open_shared ("shared",
+                                              CYGWIN_VERSION_SHARED_DATA,
                                               shared_h,
                                               sizeof (*cygwin_shared),
                                               cygwin_shared_address);
@@ -151,7 +152,8 @@ memory_init ()
   ProtectHandle (cygheap->shared_h);
 
   heap_init ();
-  mount_table = (mount_info *) open_shared (user_name, cygwin_mount_h,
+  mount_table = (mount_info *) open_shared (user_name, MOUNT_VERSION,
+                                           cygwin_mount_h,
                                            sizeof (mount_info), 0);
   debug_printf ("opening mount table for '%s' at %p", cygheap->user.name (),
                mount_table_address);
@@ -165,6 +167,9 @@ memory_init ()
       debug_printf ("initializing mount table");
       mount_table->init ();    /* Initialize the mount table.  */
     }
+  else if (mount_table->version != MOUNT_VERSION)
+    multiple_cygwin_die ();
+
 }
 
 void __stdcall
index 088b3f90886f0c2d91c49be38f6fc19cbfcc7f7f..46b53c8b3cc4dc0ab10f8bc09ff88c98209585db 100644 (file)
@@ -40,7 +40,7 @@ class mount_item
    scheme should be satisfactory for a long while yet.  */
 #define MAX_MOUNTS 30
 
-#define MOUNT_VERSION  0x01010103
+#define MOUNT_VERSION  27      // increment when mount table changes
 
 class reg_key;
 class mount_info
@@ -158,4 +158,4 @@ void __stdcall shared_terminate (void);
 #define cygheap_address                shared_align_past ((mount_info *) shared_align_past (cygwin_shared))
 
 char *__stdcall shared_name (const char *, int);
-void *__stdcall open_shared (const char *name, HANDLE &shared_h, DWORD size, void *addr);
+void *__stdcall open_shared (const char *name, int n, HANDLE &shared_h, DWORD size, void *addr);
index baf642a4d9ad4d6388acfeedf37a5480e0111753..be7a1cf313e833dc2ba807f042d59617645841c1 100644 (file)
@@ -67,10 +67,9 @@ ALL_LDFLAGS:=-B$(newlib_build)/libc/ -B$(newlib_build)/libm/ -B$(w32api_lib)/ \
 MINGW_LDFLAGS:=$(ALL_LDFLAGS) $(MINGW_LIB)
 DUMPER_LDFLAGS:=$(ALL_LDFLAGS) $(DUMPER_LIB)
 
-PROGS:=mount$(EXEEXT) umount$(EXEEXT) ps$(EXEEXT) kill$(EXEEXT) \
-       mkpasswd$(EXEEXT) mkgroup$(EXEEXT) cygpath$(EXEEXT) cygcheck$(EXEEXT) \
-       passwd$(EXEEXT) getfacl$(EXEEXT) setfacl$(EXEEXT) strace$(EXEEXT) \
-       regtool$(EXEEXT) ssp$(EXEEXT)
+PROGS:=        cygcheck.exe cygpath.exe cygme.exe getfacl.exe kill.exe mkgroup.exe \
+       mkpasswd.exe mount.exe passwd.exe ps.exe regtool.exe setfacl.exe \
+       ssp.exe strace.exe umount.exe
 
 CLEAN_PROGS:=$(PROGS)
 ifdef build_dumper
index 31f4aed16cdd0dfa8a3b562d04f4b9e863b9cb12..981c7294559060f01a5b223c13e06e58dc1bb6c3 100644 (file)
@@ -1,6 +1,6 @@
 /* mount.cc
 
-   Copyright 1996, 1997, 1998, 1999 Cygnus Solutions.
+   Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
 
 This file is part of Cygwin.
 
This page took 0.046342 seconds and 5 git commands to generate.