unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [hurd,commited 0/7] fix warnings
@ 2018-01-27 22:50 Samuel Thibault
  2018-01-27 22:50 ` [hurd,commited 1/7] hurd: fix warning Samuel Thibault
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Samuel Thibault @ 2018-01-27 22:50 UTC (permalink / raw
  To: libc-alpha; +Cc: Samuel Thibault

These are less trivial warning fixes for GNU/Hurd builds.

Samuel Thibault (7):
  hurd: fix warning
  hurd: drop elder MACH_IPC_COMPAT handling
  hurd: make build-many-glibcs.py use mainline mig
  hurd: fix warning
  hurd: fix warning
  hurd: Fix enabling vm_copy
  hurd: fix warning

 ChangeLog                     | 18 ++++++++++++++++++
 mach/Machrules                |  2 +-
 mach/mach/mach_traps.h        |  3 +--
 scripts/build-many-glibcs.py  |  9 ++++++++-
 sysdeps/mach/hurd/Makefile    |  4 ++++
 sysdeps/mach/hurd/dl-sysdep.c |  3 +++
 sysdeps/mach/hurd/fork.c      | 35 +++--------------------------------
 sysdeps/mach/hurd/getresgid.c | 17 ++++++-----------
 sysdeps/mach/hurd/getresuid.c | 17 ++++++-----------
 sysdeps/mach/hurd/profil.c    |  3 ++-
 sysdeps/mach/pagecopy.h       |  4 ++--
 11 files changed, 54 insertions(+), 61 deletions(-)

-- 
2.15.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [hurd,commited 1/7] hurd: fix warning
  2018-01-27 22:50 [hurd,commited 0/7] fix warnings Samuel Thibault
@ 2018-01-27 22:50 ` Samuel Thibault
  2018-01-27 22:50 ` [hurd,commited 2/7] hurd: drop elder MACH_IPC_COMPAT handling Samuel Thibault
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2018-01-27 22:50 UTC (permalink / raw
  To: libc-alpha; +Cc: Samuel Thibault

	* sysdeps/mach/hurd/Makefile [$(subdir)==nis]: Add
	-DUSE_BINDINGDIR=1 to CFLAGS-ypclnt.c.
---
 ChangeLog                  | 2 ++
 sysdeps/mach/hurd/Makefile | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 88f6d93c12..4e1e4bf730 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,8 @@
 	timer_ptr2id to cast struct timer_node * to void *.
 	* scripts/build-many-glibcs.py [os == gnu] (build_gcc): Pass
 	--disable-libcilkrts to gcc configure.
+	* sysdeps/mach/hurd/Makefile [$(subdir)==nis]: Add
+	-DUSE_BINDINGDIR=1 to CFLAGS-ypclnt.c.
 
 2018-01-27  James Clarke  <jrtc27@jrtc27.com>
 
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index f0d3373b64..492ace05eb 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -203,4 +203,8 @@ sysdep_headers += net/ethernet.h net/if_arp.h net/if_ether.h net/if_ppp.h \
 		  net/route.h
 endif
 
+ifeq ($(subdir),nis)
+CFLAGS-ypclnt.c += -DUSE_BINDINGDIR=1
+endif
+
 endif	# in-Makerules
-- 
2.15.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [hurd,commited 2/7] hurd: drop elder MACH_IPC_COMPAT handling
  2018-01-27 22:50 [hurd,commited 0/7] fix warnings Samuel Thibault
  2018-01-27 22:50 ` [hurd,commited 1/7] hurd: fix warning Samuel Thibault
@ 2018-01-27 22:50 ` Samuel Thibault
  2018-01-27 22:50 ` [hurd,commited 3/7] hurd: make build-many-glibcs.py use mainline mig Samuel Thibault
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2018-01-27 22:50 UTC (permalink / raw
  To: libc-alpha; +Cc: Samuel Thibault

This was dropped from GNU Mach in 2006.

	* mach/Machrules (MIGFLAGS): Do not set -DMACH_IPC_COMPAT=0.
	* mach/mach/mach_traps.h: Drop comment about MACH_IPC_COMPAT.
	* sysdeps/mach/hurd/fork.c (__fork): Drop special casing
	MACH_IPC_COMPAT.
---
 ChangeLog                |  4 ++++
 mach/Machrules           |  2 +-
 mach/mach/mach_traps.h   |  3 +--
 sysdeps/mach/hurd/fork.c | 35 +++--------------------------------
 4 files changed, 9 insertions(+), 35 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4e1e4bf730..7d7800dbb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,10 @@
 	--disable-libcilkrts to gcc configure.
 	* sysdeps/mach/hurd/Makefile [$(subdir)==nis]: Add
 	-DUSE_BINDINGDIR=1 to CFLAGS-ypclnt.c.
+	* mach/Machrules (MIGFLAGS): Do not set -DMACH_IPC_COMPAT=0.
+	* mach/mach/mach_traps.h: Drop comment about MACH_IPC_COMPAT.
+	* sysdeps/mach/hurd/fork.c (__fork): Drop special casing
+	MACH_IPC_COMPAT.
 
 2018-01-27  James Clarke  <jrtc27@jrtc27.com>
 
diff --git a/mach/Machrules b/mach/Machrules
index 49e6399b7c..4f9ec421ec 100644
--- a/mach/Machrules
+++ b/mach/Machrules
@@ -51,7 +51,7 @@ $(objpfx)dummy.mk:
 	$(make-target-directory)
 	echo '# Empty' > $@
 
-MIGFLAGS = -DMACH_IPC_COMPAT=0 -DSTANDALONE -DTypeCheck=0 \
+MIGFLAGS = -DSTANDALONE -DTypeCheck=0 \
 	   $(+includes) $(migdefines) -subrprefix __
 # Putting CC in the enivronment makes the mig wrapper script
 # use the same compiler setup we are using to run cpp.
diff --git a/mach/mach/mach_traps.h b/mach/mach/mach_traps.h
index 5e09a95310..cefbd2d372 100644
--- a/mach/mach/mach_traps.h
+++ b/mach/mach/mach_traps.h
@@ -17,8 +17,7 @@
 
 /* Declare the few Mach system calls (except mach_msg, in <mach/message.h>).
    This does not include the kernel RPC shortcut calls (in <mach-shortcuts.h>).
-
-   This file omits the MACH_IPC_COMPAT functions.  */
+   */
 
 #ifndef	_MACH_MACH_TRAPS_H
 
diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c
index fe3f544f2b..b55eecffc6 100644
--- a/sysdeps/mach/hurd/fork.c
+++ b/sysdeps/mach/hurd/fork.c
@@ -213,38 +213,9 @@ __fork (void)
 	    {
 	      /* This is a receive right.  We want to give the child task
 		 its own new receive right under the same name.  */
-	      err = __mach_port_allocate_name (newtask,
-					       MACH_PORT_RIGHT_RECEIVE,
-					       portnames[i]);
-	      if (err == KERN_NAME_EXISTS)
-		{
-		  /* It already has a right under this name (?!).  Well,
-		     there is this bizarre old Mach IPC feature (in #ifdef
-		     MACH_IPC_COMPAT in the ukernel) which results in new
-		     tasks getting a new receive right for task special
-		     port number 2.  What else might be going on I'm not
-		     sure.  So let's check.  */
-#if !MACH_IPC_COMPAT
-#define TASK_NOTIFY_PORT 2
-#endif
-		  assert (({ mach_port_t thisport, notify_port;
-			     mach_msg_type_name_t poly;
-			     (__task_get_special_port (newtask,
-						       TASK_NOTIFY_PORT,
-						       &notify_port) == 0 &&
-			      __mach_port_extract_right
-			      (newtask,
-			       portnames[i],
-			       MACH_MSG_TYPE_MAKE_SEND,
-			       &thisport, &poly) == 0 &&
-			      (thisport == notify_port) &&
-			      __mach_port_deallocate (__mach_task_self (),
-						      thisport) == 0 &&
-			      __mach_port_deallocate (__mach_task_self (),
-						      notify_port) == 0);
-			   }));
-		}
-	      else if (err)
+	      if (err = __mach_port_allocate_name (newtask,
+						   MACH_PORT_RIGHT_RECEIVE,
+						   portnames[i]))
 		LOSE;
 	      if (porttypes[i] & MACH_PORT_TYPE_SEND)
 		{
-- 
2.15.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [hurd,commited 3/7] hurd: make build-many-glibcs.py use mainline mig
  2018-01-27 22:50 [hurd,commited 0/7] fix warnings Samuel Thibault
  2018-01-27 22:50 ` [hurd,commited 1/7] hurd: fix warning Samuel Thibault
  2018-01-27 22:50 ` [hurd,commited 2/7] hurd: drop elder MACH_IPC_COMPAT handling Samuel Thibault
@ 2018-01-27 22:50 ` Samuel Thibault
  2018-01-29 14:00   ` Joseph Myers
  2018-01-27 22:50 ` [hurd,commited 4/7] hurd: fix warning Samuel Thibault
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 9+ messages in thread
From: Samuel Thibault @ 2018-01-27 22:50 UTC (permalink / raw
  To: libc-alpha; +Cc: Samuel Thibault

Some warnings come from code generated by mig, so we need a very recent
version for now.

        * scripts/build-many-glibcs.py (checkout_vcs): Add mig repository
        URL, and run autoreconf, make it the default for now.
---
 ChangeLog                    | 2 ++
 scripts/build-many-glibcs.py | 9 ++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 7d7800dbb1..9582d8cfed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,8 @@
 	timer_ptr2id to cast struct timer_node * to void *.
 	* scripts/build-many-glibcs.py [os == gnu] (build_gcc): Pass
 	--disable-libcilkrts to gcc configure.
+	(checkout_vcs): Add mig repository URL, and run autoreconf, make it the
+	default for now.
 	* sysdeps/mach/hurd/Makefile [$(subdir)==nis]: Add
 	-DUSE_BINDINGDIR=1 to CFLAGS-ypclnt.c.
 	* mach/Machrules (MIGFLAGS): Do not set -DMACH_IPC_COMPAT=0.
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index fbb701e25d..d7adcc8022 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -704,7 +704,7 @@ class Context(object):
                             'linux': '4.14',
                             'mpc': '1.1.0',
                             'mpfr': '4.0.0',
-                            'mig': '1.8',
+                            'mig': 'vcs-mainline',
                             'gnumach': '1.8',
                             'hurd': 'vcs-mainline'}
         use_versions = {}
@@ -786,6 +786,13 @@ class Context(object):
             r = self.git_checkout(component, git_url, git_branch, update)
             self.fix_glibc_timestamps()
             return r
+        elif component == 'mig':
+            git_url = 'git://git.savannah.gnu.org/hurd/mig.git'
+            git_branch = 'master'
+            r = self.git_checkout(component, git_url, git_branch, update)
+            subprocess.run(['autoreconf', '-i'],
+                           cwd=self.component_srcdir(component), check=True)
+            return r
         elif component == 'hurd':
             git_url = 'git://git.savannah.gnu.org/hurd/hurd.git'
             git_branch = 'master'
-- 
2.15.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [hurd,commited 4/7] hurd: fix warning
  2018-01-27 22:50 [hurd,commited 0/7] fix warnings Samuel Thibault
                   ` (2 preceding siblings ...)
  2018-01-27 22:50 ` [hurd,commited 3/7] hurd: make build-many-glibcs.py use mainline mig Samuel Thibault
@ 2018-01-27 22:50 ` Samuel Thibault
  2018-01-27 22:51 ` [hurd,commited 5/7] " Samuel Thibault
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2018-01-27 22:50 UTC (permalink / raw
  To: libc-alpha; +Cc: Samuel Thibault

	* sysdeps/mach/hurd/dl-sysdep.c (_exit): Call LOSE and abort() if
	__task_terminate would ever return successfully.
---
 ChangeLog                     | 2 ++
 sysdeps/mach/hurd/dl-sysdep.c | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 9582d8cfed..5dd9e9fcb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,8 @@
 	* mach/mach/mach_traps.h: Drop comment about MACH_IPC_COMPAT.
 	* sysdeps/mach/hurd/fork.c (__fork): Drop special casing
 	MACH_IPC_COMPAT.
+	* sysdeps/mach/hurd/dl-sysdep.c (_exit): Call LOSE and abort() if
+	__task_terminate would ever return successfully.
 
 2018-01-27  James Clarke  <jrtc27@jrtc27.com>
 
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 2cd63bb83a..ef96df054e 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -643,6 +643,9 @@ _exit (int status)
 		    W_EXITCODE (status, 0), 0);
   while (__task_terminate (__mach_task_self ()))
     __mach_task_self_ = (__mach_task_self) ();
+
+  LOSE;
+  abort ();
 }
 /* We need this alias to satisfy references from libc_pic.a objects
    that were affected by the libc_hidden_proto declaration for _exit.  */
-- 
2.15.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [hurd,commited 5/7] hurd: fix warning
  2018-01-27 22:50 [hurd,commited 0/7] fix warnings Samuel Thibault
                   ` (3 preceding siblings ...)
  2018-01-27 22:50 ` [hurd,commited 4/7] hurd: fix warning Samuel Thibault
@ 2018-01-27 22:51 ` Samuel Thibault
  2018-01-27 22:51 ` [hurd,commited 6/7] hurd: Fix enabling vm_copy Samuel Thibault
  2018-01-27 22:51 ` [hurd,commited 7/7] hurd: fix warning Samuel Thibault
  6 siblings, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2018-01-27 22:51 UTC (permalink / raw
  To: libc-alpha; +Cc: Samuel Thibault

Making `special_profil_failure' both avoids warning "variable
'special_profil_failure' set but not used", and makes it easier to
access with gdb.

	* sysdeps/mach/hurd/profil.c (special_profil_failure): Move variable
	to global scope.
---
 ChangeLog                  | 2 ++
 sysdeps/mach/hurd/profil.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 5dd9e9fcb6..5e62415607 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,8 @@
 	MACH_IPC_COMPAT.
 	* sysdeps/mach/hurd/dl-sysdep.c (_exit): Call LOSE and abort() if
 	__task_terminate would ever return successfully.
+	* sysdeps/mach/hurd/profil.c (special_profil_failure): Move variable
+	to global scope.
 
 2018-01-27  James Clarke  <jrtc27@jrtc27.com>
 
diff --git a/sysdeps/mach/hurd/profil.c b/sysdeps/mach/hurd/profil.c
index 2fe8f9de56..b3f201b016 100644
--- a/sysdeps/mach/hurd/profil.c
+++ b/sysdeps/mach/hurd/profil.c
@@ -138,6 +138,8 @@ __profil (u_short *sample_buffer, size_t size, size_t offset, u_int scale)
 }
 weak_alias (__profil, profil)
 
+static volatile error_t special_profil_failure;
+
 /* Fetch PC samples.  This function must be very careful not to depend
    on Hurd threadvar variables.  We arrange that by using a special
    stub arranged for at the end of this file. */
@@ -154,7 +156,6 @@ fetch_samples (void)
 				     pc_samples, &nsamples);
   if (err)
     {
-      static volatile error_t special_profil_failure;
       static volatile int a, b;
 
       special_profil_failure = err;
-- 
2.15.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [hurd,commited 6/7] hurd: Fix enabling vm_copy
  2018-01-27 22:50 [hurd,commited 0/7] fix warnings Samuel Thibault
                   ` (4 preceding siblings ...)
  2018-01-27 22:51 ` [hurd,commited 5/7] " Samuel Thibault
@ 2018-01-27 22:51 ` Samuel Thibault
  2018-01-27 22:51 ` [hurd,commited 7/7] hurd: fix warning Samuel Thibault
  6 siblings, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2018-01-27 22:51 UTC (permalink / raw
  To: libc-alpha; +Cc: Samuel Thibault

Benchmarked on
http://lists.gnu.org/archive/html/bug-hurd/2014-12/msg00081.html

	* sysdeps/mach/pagecopy.h (PAGE_THRESHOLD): Rename to
	PAGE_COPY_THRESHOLD and set to benchmarked 16384.
---
 ChangeLog               | 2 ++
 sysdeps/mach/pagecopy.h | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5e62415607..95e2c07df5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -31,6 +31,8 @@
 	__task_terminate would ever return successfully.
 	* sysdeps/mach/hurd/profil.c (special_profil_failure): Move variable
 	to global scope.
+	* sysdeps/mach/pagecopy.h (PAGE_THRESHOLD): Rename to
+	PAGE_COPY_THRESHOLD and set to benchmarked 16384.
 
 2018-01-27  James Clarke  <jrtc27@jrtc27.com>
 
diff --git a/sysdeps/mach/pagecopy.h b/sysdeps/mach/pagecopy.h
index 6285ffb416..8583df4569 100644
--- a/sysdeps/mach/pagecopy.h
+++ b/sysdeps/mach/pagecopy.h
@@ -19,8 +19,8 @@
 #include <mach.h>
 
 /* Threshold at which vm_copy is more efficient than well-optimized copying
-   by words.  This parameter should be tuned as necessary.  */
-#define PAGE_THRESHOLD		(2 * PAGE_SIZE)	/* XXX ? */
+   by words.  */
+#define PAGE_COPY_THRESHOLD		(16384)
 
 #define PAGE_SIZE		__vm_page_size
 #define PAGE_COPY_FWD(dstp, srcp, nbytes_left, nbytes)			      \
-- 
2.15.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [hurd,commited 7/7] hurd: fix warning
  2018-01-27 22:50 [hurd,commited 0/7] fix warnings Samuel Thibault
                   ` (5 preceding siblings ...)
  2018-01-27 22:51 ` [hurd,commited 6/7] hurd: Fix enabling vm_copy Samuel Thibault
@ 2018-01-27 22:51 ` Samuel Thibault
  6 siblings, 0 replies; 9+ messages in thread
From: Samuel Thibault @ 2018-01-27 22:51 UTC (permalink / raw
  To: libc-alpha; +Cc: Samuel Thibault

	* sysdeps/mach/hurd/getresgid.c (__getresgid): Set result from
	critical section to make code simpler and avoid warning.
	* sysdeps/mach/hurd/getresuid.c (__getresuid): Set result from
	critical section to make code simpler and avoid warning.
---
 ChangeLog                     |  4 ++++
 sysdeps/mach/hurd/getresgid.c | 17 ++++++-----------
 sysdeps/mach/hurd/getresuid.c | 17 ++++++-----------
 3 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 95e2c07df5..5eebc649cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,10 @@
 	to global scope.
 	* sysdeps/mach/pagecopy.h (PAGE_THRESHOLD): Rename to
 	PAGE_COPY_THRESHOLD and set to benchmarked 16384.
+	* sysdeps/mach/hurd/getresgid.c (__getresgid): Set result from
+	critical section to make code simpler and avoid warning.
+	* sysdeps/mach/hurd/getresuid.c (__getresuid): Set result from
+	critical section to make code simpler and avoid warning.
 
 2018-01-27  James Clarke  <jrtc27@jrtc27.com>
 
diff --git a/sysdeps/mach/hurd/getresgid.c b/sysdeps/mach/hurd/getresgid.c
index 41823ff3e1..e5eeba8ac5 100644
--- a/sysdeps/mach/hurd/getresgid.c
+++ b/sysdeps/mach/hurd/getresgid.c
@@ -27,7 +27,6 @@ int
 __getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)
 {
   error_t err;
-  gid_t real, eff, saved;
 
   HURD_CRITICAL_BEGIN;
   __mutex_lock (&_hurd_id.lock);
@@ -40,22 +39,18 @@ __getresgid (gid_t *rgid, gid_t *egid, gid_t *sgid)
 	err = EGRATUITOUS;
       else
 	{
-	  real = _hurd_id.aux.gids[0];
-	  eff = _hurd_id.gen.ngids < 1 ? real : _hurd_id.gen.gids[0];
-	  saved = _hurd_id.aux.ngids < 2 ? real : _hurd_id.aux.gids[1];
+	  gid_t real = _hurd_id.aux.gids[0];
+
+	  *rgid = real;
+	  *egid = _hurd_id.gen.ngids < 1 ? real : _hurd_id.gen.gids[0];
+	  *sgid = _hurd_id.aux.ngids < 2 ? real : _hurd_id.aux.gids[1];
 	}
     }
 
   __mutex_unlock (&_hurd_id.lock);
   HURD_CRITICAL_END;
 
-  if (err)
-    return __hurd_fail (err);
-
-  *rgid = real;
-  *egid = eff;
-  *sgid = saved;
-  return 0;
+  return __hurd_fail (err);
 }
 libc_hidden_def (__getresgid)
 weak_alias (__getresgid, getresgid)
diff --git a/sysdeps/mach/hurd/getresuid.c b/sysdeps/mach/hurd/getresuid.c
index 1f2340350b..4af4786fc5 100644
--- a/sysdeps/mach/hurd/getresuid.c
+++ b/sysdeps/mach/hurd/getresuid.c
@@ -27,7 +27,6 @@ int
 __getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)
 {
   error_t err;
-  uid_t real, eff, saved;
 
   HURD_CRITICAL_BEGIN;
   __mutex_lock (&_hurd_id.lock);
@@ -40,22 +39,18 @@ __getresuid (uid_t *ruid, uid_t *euid, uid_t *suid)
 	err = EGRATUITOUS;
       else
 	{
-	  real = _hurd_id.aux.uids[0];
-	  eff = _hurd_id.gen.nuids < 1 ? real : _hurd_id.gen.uids[0];
-	  saved = _hurd_id.aux.nuids < 2 ? real : _hurd_id.aux.uids[1];
+	  uid_t real = _hurd_id.aux.uids[0];
+
+	  *ruid = real;
+	  *euid = _hurd_id.gen.nuids < 1 ? real : _hurd_id.gen.uids[0];
+	  *suid = _hurd_id.aux.nuids < 2 ? real : _hurd_id.aux.uids[1];
 	}
     }
 
   __mutex_unlock (&_hurd_id.lock);
   HURD_CRITICAL_END;
 
-  if (err)
-    return __hurd_fail (err);
-
-  *ruid = real;
-  *euid = eff;
-  *suid = saved;
-  return 0;
+  return __hurd_fail (err);
 }
 libc_hidden_def (__getresuid)
 weak_alias (__getresuid, getresuid)
-- 
2.15.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [hurd,commited 3/7] hurd: make build-many-glibcs.py use mainline mig
  2018-01-27 22:50 ` [hurd,commited 3/7] hurd: make build-many-glibcs.py use mainline mig Samuel Thibault
@ 2018-01-29 14:00   ` Joseph Myers
  0 siblings, 0 replies; 9+ messages in thread
From: Joseph Myers @ 2018-01-29 14:00 UTC (permalink / raw
  To: Samuel Thibault; +Cc: libc-alpha

Followup committed:

Make build-many-glibcs.py clean git source directories.

With the git checkouts of Hurd components in build-many-glibcs.py
involving running autoreconf, there's a risk that generated files
could be left behind by an old autoreconf run (if an old version of
the sources generates those files in the source directory but a new
version does not).

This patch avoids that by using git clean -dxfq when updating git
checkouts.  In this patch, that's conditional on --replace-sources, to
avoid removing any local not-checked-in files someone may have in
their checkout unless the option has been specifically passed that
says it's OK to blow old checkouts away, complete with any local
changes to them.

2018-01-29  Joseph Myers  <joseph@codesourcery.com>

	* scripts/build-many-glibcs.py (Context.git_checkout): Use git
	clean -dxfq for git updates when replacing sources.

diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index 0c2ea85..baa6704 100755
--- a/scripts/build-many-glibcs.py
+++ b/scripts/build-many-glibcs.py
@@ -816,6 +816,9 @@ class Context(object):
         if update:
             subprocess.run(['git', 'remote', 'prune', 'origin'],
                            cwd=self.component_srcdir(component), check=True)
+            if self.replace_sources:
+                subprocess.run(['git', 'clean', '-dxfq'],
+                               cwd=self.component_srcdir(component), check=True)
             subprocess.run(['git', 'pull', '-q'],
                            cwd=self.component_srcdir(component), check=True)
         else:

-- 
Joseph S. Myers
joseph@codesourcery.com


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-01-29 13:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-27 22:50 [hurd,commited 0/7] fix warnings Samuel Thibault
2018-01-27 22:50 ` [hurd,commited 1/7] hurd: fix warning Samuel Thibault
2018-01-27 22:50 ` [hurd,commited 2/7] hurd: drop elder MACH_IPC_COMPAT handling Samuel Thibault
2018-01-27 22:50 ` [hurd,commited 3/7] hurd: make build-many-glibcs.py use mainline mig Samuel Thibault
2018-01-29 14:00   ` Joseph Myers
2018-01-27 22:50 ` [hurd,commited 4/7] hurd: fix warning Samuel Thibault
2018-01-27 22:51 ` [hurd,commited 5/7] " Samuel Thibault
2018-01-27 22:51 ` [hurd,commited 6/7] hurd: Fix enabling vm_copy Samuel Thibault
2018-01-27 22:51 ` [hurd,commited 7/7] hurd: fix warning Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).