public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [hurd,commited 0/6] hurd: fixes against previous hurd commits
@ 2018-01-30  2:12 Samuel Thibault
  2018-01-30  4:10 ` [hurd,commited 3/6] allocalim.h: Fix codestyle Samuel Thibault
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Samuel Thibault @ 2018-01-30  2:12 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault

Samuel Thibault (6):
  hurd: Fix preprocessor indentation
  hurd: Fix ChangeLog date
  allocalim.h: Fix codestyle
  libio: Rename _FWRITE to FWRITE_FUNC
  malloc: Use assert.h's assert macro
  hurd: Fix comments for FREAD and FWRITE

 ChangeLog                      | 11 ++++++++++-
 bits/fcntl.h                   |  5 +----
 hurd/hurd/fd.h                 |  8 ++++----
 hurd/hurd/port.h               | 24 ++++++++++++------------
 hurd/hurd/signal.h             | 18 +++++++++---------
 hurd/hurd/threadvar.h          |  8 ++++----
 hurd/hurd/userlink.h           | 12 ++++++------
 libio/tst-memstream3.c         | 10 +++++-----
 libio/tst-wmemstream3.c        |  2 +-
 malloc/malloc.c                | 11 ++++-------
 sysdeps/mach/hurd/bits/fcntl.h |  2 +-
 sysdeps/pthread/allocalim.h    |  6 +++---
 12 files changed, 60 insertions(+), 57 deletions(-)

-- 
2.15.1

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

* [hurd,commited 3/6] allocalim.h: Fix codestyle
  2018-01-30  2:12 [hurd,commited 0/6] hurd: fixes against previous hurd commits Samuel Thibault
@ 2018-01-30  4:10 ` Samuel Thibault
  2018-01-31 15:07   ` Adhemerval Zanella
  2018-01-30  7:54 ` [hurd,commited 4/6] libio: Rename _FWRITE to FWRITE_FUNC Samuel Thibault
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Samuel Thibault @ 2018-01-30  4:10 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault

	* sysdeps/pthread/allocalim.h (__libc_use_alloca): Commute operands of
	|| to respect codestyle.
---
 ChangeLog                   | 2 ++
 sysdeps/pthread/allocalim.h | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 873646e685..476cb73847 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,8 @@
 	* sysdeps/mach/hurd/i386/libresolv.abilist: New file.
 	* sysdeps/mach/hurd/i386/librt.abilist: New file.
 	* sysdeps/mach/hurd/i386/libutil.abilist: New file.
+	* sysdeps/pthread/allocalim.h (__libc_use_alloca): Commute operands of
+	|| to respect codestyle.
 
 2018-01-29  Darius Rad  <darius@bluespec.com>
 
diff --git a/sysdeps/pthread/allocalim.h b/sysdeps/pthread/allocalim.h
index fdae0c251f..38faf57b70 100644
--- a/sysdeps/pthread/allocalim.h
+++ b/sysdeps/pthread/allocalim.h
@@ -24,9 +24,9 @@ extern __always_inline
 int
 __libc_use_alloca (size_t size)
 {
-  return (
+  return (__builtin_expect (__libc_alloca_cutoff (size), 1)
 #ifdef PTHREAD_STACK_MIN
-          __builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1) ||
+          || __builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1)
 #endif
-          __builtin_expect (__libc_alloca_cutoff (size), 1));
+	  );
 }
-- 
2.15.1

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

* [hurd,commited 4/6] libio: Rename _FWRITE to FWRITE_FUNC
  2018-01-30  2:12 [hurd,commited 0/6] hurd: fixes against previous hurd commits Samuel Thibault
  2018-01-30  4:10 ` [hurd,commited 3/6] allocalim.h: Fix codestyle Samuel Thibault
@ 2018-01-30  7:54 ` Samuel Thibault
  2018-01-30 10:09 ` [hurd,commited 1/6] hurd: Fix preprocessor indentation Samuel Thibault
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Samuel Thibault @ 2018-01-30  7:54 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault

_FWRITE would be in the reserved-namespace.

	* libio/tst-memstream3.c (_FWRITE): Rename to FWRITE_FUNC.
	(do_test_bz20181): Rename accordingly.
---
 ChangeLog               |  2 ++
 libio/tst-memstream3.c  | 10 +++++-----
 libio/tst-wmemstream3.c |  2 +-
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 476cb73847..2694f6d363 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,8 @@
 	* sysdeps/mach/hurd/i386/libutil.abilist: New file.
 	* sysdeps/pthread/allocalim.h (__libc_use_alloca): Commute operands of
 	|| to respect codestyle.
+	* libio/tst-memstream3.c (_FWRITE): Rename to FWRITE_FUNC.
+	(do_test_bz20181): Rename accordingly.
 
 2018-01-29  Darius Rad  <darius@bluespec.com>
 
diff --git a/libio/tst-memstream3.c b/libio/tst-memstream3.c
index df0da5bac5..bb3300dc57 100644
--- a/libio/tst-memstream3.c
+++ b/libio/tst-memstream3.c
@@ -29,7 +29,7 @@
 # define W(o) o
 # define OPEN_MEMSTREAM open_memstream
 # define PRINTF printf
-# define _FWRITE fwrite
+# define FWRITE_FUNC fwrite
 # define FPUTC fputc
 # define STRCMP strcmp
 #endif
@@ -114,14 +114,14 @@ do_test_bz20181 (void)
   if (fp == NULL)
     ERROR_RET1 ("%s failed\n", S(OPEN_MEMSTREAM));
 
-  if ((ret = _FWRITE (W("abc"), 1, 3, fp)) != 3)
-    ERROR_RET1 ("%s failed (errno = %d)\n", S(_FWRITE), errno);
+  if ((ret = FWRITE_FUNC (W("abc"), 1, 3, fp)) != 3)
+    ERROR_RET1 ("%s failed (errno = %d)\n", S(FWRITE_FUNC), errno);
 
   if (fseek (fp, 0, SEEK_SET) != 0)
     ERROR_RET1 ("fseek failed (errno = %d)\n", errno);
 
-  if (_FWRITE (W("z"), 1, 1, fp) != 1)
-    ERROR_RET1 ("%s failed (errno = %d)\n", S(_FWRITE), errno);
+  if (FWRITE_FUNC (W("z"), 1, 1, fp) != 1)
+    ERROR_RET1 ("%s failed (errno = %d)\n", S(FWRITE_FUNC), errno);
 
   if (fflush (fp) != 0)
     ERROR_RET1 ("fflush failed (errno = %d)\n", errno);
diff --git a/libio/tst-wmemstream3.c b/libio/tst-wmemstream3.c
index 4edc2b9094..f24f0facc6 100644
--- a/libio/tst-wmemstream3.c
+++ b/libio/tst-wmemstream3.c
@@ -37,7 +37,7 @@ fwwrite (const void *ptr, size_t size, size_t nmemb, FILE *arq)
 #define W(o) L##o
 #define OPEN_MEMSTREAM open_wmemstream
 #define PRINTF wprintf
-#define _FWRITE fwwrite
+#define FWRITE_FUNC fwwrite
 #define FPUTC  fputwc
 #define STRCMP wcscmp
 
-- 
2.15.1

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

* [hurd,commited 1/6] hurd: Fix preprocessor indentation
  2018-01-30  2:12 [hurd,commited 0/6] hurd: fixes against previous hurd commits Samuel Thibault
  2018-01-30  4:10 ` [hurd,commited 3/6] allocalim.h: Fix codestyle Samuel Thibault
  2018-01-30  7:54 ` [hurd,commited 4/6] libio: Rename _FWRITE to FWRITE_FUNC Samuel Thibault
@ 2018-01-30 10:09 ` Samuel Thibault
  2018-01-30 11:53 ` [hurd,commited 5/6] malloc: Use assert.h's assert macro Samuel Thibault
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Samuel Thibault @ 2018-01-30 10:09 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault

---
 hurd/hurd/fd.h        |  8 ++++----
 hurd/hurd/port.h      | 24 ++++++++++++------------
 hurd/hurd/signal.h    | 18 +++++++++---------
 hurd/hurd/threadvar.h |  8 ++++----
 hurd/hurd/userlink.h  | 12 ++++++------
 5 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h
index f43dec508a..22dc944dce 100644
--- a/hurd/hurd/fd.h
+++ b/hurd/hurd/fd.h
@@ -62,7 +62,7 @@ extern struct mutex _hurd_dtable_lock; /* Locks those two variables.  */
 extern struct hurd_fd *_hurd_fd_get (int fd);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_FD_H_EXTERN_INLINE struct hurd_fd *
 _hurd_fd_get (int fd)
 {
@@ -95,7 +95,7 @@ _hurd_fd_get (int fd)
 
   return descriptor;
 }
-#  endif
+# endif
 #endif
 
 
@@ -281,7 +281,7 @@ extern int _hurd_select (int nfds, struct pollfd *pollfds,
    __hurd_file_name_lookup.  */
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_FD_H_EXTERN_INLINE error_t
 __hurd_at_flags (int *at_flags, int *flags)
 {
@@ -298,7 +298,7 @@ __hurd_at_flags (int *at_flags, int *flags)
 
   return 0;
 }
-#  endif
+# endif
 #endif
 
 /* Variant of file_name_lookup used in *at function implementations.
diff --git a/hurd/hurd/port.h b/hurd/hurd/port.h
index f1da86951d..eec85ccc29 100644
--- a/hurd/hurd/port.h
+++ b/hurd/hurd/port.h
@@ -63,7 +63,7 @@ struct hurd_port
 extern void _hurd_port_init (struct hurd_port *port, mach_port_t init);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_PORT_H_EXTERN_INLINE void
 _hurd_port_init (struct hurd_port *port, mach_port_t init)
 {
@@ -71,7 +71,7 @@ _hurd_port_init (struct hurd_port *port, mach_port_t init)
   port->users = NULL;
   port->port = init;
 }
-#  endif
+# endif
 #endif
 
 
@@ -86,7 +86,7 @@ _hurd_port_locked_get (struct hurd_port *port,
 		       struct hurd_userlink *link);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_PORT_H_EXTERN_INLINE mach_port_t
 _hurd_port_locked_get (struct hurd_port *port,
 		       struct hurd_userlink *link)
@@ -102,7 +102,7 @@ _hurd_port_locked_get (struct hurd_port *port,
   __spin_unlock (&port->lock);
   return result;
 }
-#  endif
+# endif
 #endif
 
 /* Same, but locks PORT first.  */
@@ -112,7 +112,7 @@ _hurd_port_get (struct hurd_port *port,
 		struct hurd_userlink *link);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_PORT_H_EXTERN_INLINE mach_port_t
 _hurd_port_get (struct hurd_port *port,
 		struct hurd_userlink *link)
@@ -124,7 +124,7 @@ _hurd_port_get (struct hurd_port *port,
   HURD_CRITICAL_END;
   return result;
 }
-#  endif
+# endif
 #endif
 
 
@@ -136,7 +136,7 @@ _hurd_port_free (struct hurd_port *port,
 		 mach_port_t used_port);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_PORT_H_EXTERN_INLINE void
 _hurd_port_free (struct hurd_port *port,
 		 struct hurd_userlink *link,
@@ -156,7 +156,7 @@ _hurd_port_free (struct hurd_port *port,
   if (dealloc)
     __mach_port_deallocate (__mach_task_self (), used_port);
 }
-#  endif
+# endif
 #endif
 
 
@@ -166,7 +166,7 @@ _hurd_port_free (struct hurd_port *port,
 extern void _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_PORT_H_EXTERN_INLINE void
 _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport)
 {
@@ -177,7 +177,7 @@ _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport)
   if (old != MACH_PORT_NULL)
     __mach_port_deallocate (__mach_task_self (), old);
 }
-#  endif
+# endif
 #endif
 
 /* Same, but locks PORT first.  */
@@ -185,7 +185,7 @@ _hurd_port_locked_set (struct hurd_port *port, mach_port_t newport)
 extern void _hurd_port_set (struct hurd_port *port, mach_port_t newport);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_PORT_H_EXTERN_INLINE void
 _hurd_port_set (struct hurd_port *port, mach_port_t newport)
 {
@@ -194,7 +194,7 @@ _hurd_port_set (struct hurd_port *port, mach_port_t newport)
   _hurd_port_locked_set (port, newport);
   HURD_CRITICAL_END;
 }
-#  endif
+# endif
 #endif
 
 
diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h
index 5ee95acd09..53234724a4 100644
--- a/hurd/hurd/signal.h
+++ b/hurd/hurd/signal.h
@@ -43,9 +43,9 @@
 #include <hurd/threadvar.h>	/* We cache sigstate in a threadvar.  */
 struct hurd_signal_preemptor;	/* <hurd/sigpreempt.h> */
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc) || IS_IN (libpthread)
-#    include <sigsetops.h>
-#  endif
+# if IS_IN (libc) || IS_IN (libpthread)
+#  include <sigsetops.h>
+# endif
 #endif
 
 
@@ -135,7 +135,7 @@ extern struct hurd_sigstate *_hurd_self_sigstate (void)
 #endif
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_SIGNAL_H_EXTERN_INLINE struct hurd_sigstate *
 _hurd_self_sigstate (void)
 {
@@ -145,7 +145,7 @@ _hurd_self_sigstate (void)
     *location = _hurd_thread_sigstate (__mach_thread_self ());
   return *location;
 }
-#  endif
+# endif
 #endif
 \f
 /* Thread listening on our message port; also called the "signal thread".  */
@@ -176,7 +176,7 @@ extern int _hurd_core_limit;
 extern void *_hurd_critical_section_lock (void);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_SIGNAL_H_EXTERN_INLINE void *
 _hurd_critical_section_lock (void)
 {
@@ -201,13 +201,13 @@ _hurd_critical_section_lock (void)
      _hurd_critical_section_unlock to unlock it.  */
   return ss;
 }
-#  endif
+# endif
 #endif
 
 extern void _hurd_critical_section_unlock (void *our_lock);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_SIGNAL_H_EXTERN_INLINE void
 _hurd_critical_section_unlock (void *our_lock)
 {
@@ -230,7 +230,7 @@ _hurd_critical_section_unlock (void *our_lock)
 	__msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ());
     }
 }
-#  endif
+# endif
 #endif
 
 /* Convenient macros for simple uses of critical sections.
diff --git a/hurd/hurd/threadvar.h b/hurd/hurd/threadvar.h
index b5fc29da77..9b9b863dd6 100644
--- a/hurd/hurd/threadvar.h
+++ b/hurd/hurd/threadvar.h
@@ -83,7 +83,7 @@ extern unsigned long int *__hurd_threadvar_location_from_sp
   (enum __hurd_threadvar_index __index, void *__sp);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_THREADVAR_H_EXTERN_INLINE unsigned long int *
 __hurd_threadvar_location_from_sp (enum __hurd_threadvar_index __index,
 				   void *__sp)
@@ -95,7 +95,7 @@ __hurd_threadvar_location_from_sp (enum __hurd_threadvar_index __index,
 	   : (unsigned long int *) ((__stack & __hurd_threadvar_stack_mask) +
 				    __hurd_threadvar_stack_offset))[__index];
 }
-#  endif
+# endif
 #endif
 
 #include <machine-sp.h>		/* Define __thread_stack_pointer.  */
@@ -111,14 +111,14 @@ __hurd_threadvar_location (enum __hurd_threadvar_index __index) __THROW
      __attribute__ ((__const__));
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_THREADVAR_H_EXTERN_INLINE unsigned long int *
 __hurd_threadvar_location (enum __hurd_threadvar_index __index)
 {
   return __hurd_threadvar_location_from_sp (__index,
 					    __thread_stack_pointer ());
 }
-#  endif
+# endif
 #endif
 
 
diff --git a/hurd/hurd/userlink.h b/hurd/hurd/userlink.h
index 66c04067a1..fb7cab27c3 100644
--- a/hurd/hurd/userlink.h
+++ b/hurd/hurd/userlink.h
@@ -81,7 +81,7 @@ _hurd_userlink_link (struct hurd_userlink **chainp,
 		     struct hurd_userlink *link);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_USERLINK_H_EXTERN_INLINE void
 _hurd_userlink_link (struct hurd_userlink **chainp,
 		     struct hurd_userlink *link)
@@ -102,7 +102,7 @@ _hurd_userlink_link (struct hurd_userlink **chainp,
   link->thread.prevp = thread_chainp;
   *thread_chainp = link;
 }
-#  endif
+# endif
 #endif
 
 
@@ -112,7 +112,7 @@ _hurd_userlink_link (struct hurd_userlink **chainp,
 extern int _hurd_userlink_unlink (struct hurd_userlink *link);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_USERLINK_H_EXTERN_INLINE int
 _hurd_userlink_unlink (struct hurd_userlink *link)
 {
@@ -135,7 +135,7 @@ _hurd_userlink_unlink (struct hurd_userlink *link)
 
   return dealloc;
 }
-#  endif
+# endif
 #endif
 
 
@@ -148,7 +148,7 @@ _hurd_userlink_unlink (struct hurd_userlink *link)
 extern int _hurd_userlink_clear (struct hurd_userlink **chainp);
 
 #if defined __USE_EXTERN_INLINES && defined _LIBC
-#  if IS_IN (libc)
+# if IS_IN (libc)
 _HURD_USERLINK_H_EXTERN_INLINE int
 _hurd_userlink_clear (struct hurd_userlink **chainp)
 {
@@ -161,7 +161,7 @@ _hurd_userlink_clear (struct hurd_userlink **chainp)
   *chainp = NULL;
   return 0;
 }
-#  endif
+# endif
 #endif
 
 #endif	/* hurd/userlink.h */
-- 
2.15.1

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

* [hurd,commited 5/6] malloc: Use assert.h's assert macro
  2018-01-30  2:12 [hurd,commited 0/6] hurd: fixes against previous hurd commits Samuel Thibault
                   ` (2 preceding siblings ...)
  2018-01-30 10:09 ` [hurd,commited 1/6] hurd: Fix preprocessor indentation Samuel Thibault
@ 2018-01-30 11:53 ` Samuel Thibault
  2018-01-30 13:14 ` [hurd,commited 2/6] hurd: Fix ChangeLog date Samuel Thibault
  2018-01-30 13:24 ` [hurd,commited 6/6] hurd: Fix comments for FREAD and FWRITE Samuel Thibault
  5 siblings, 0 replies; 10+ messages in thread
From: Samuel Thibault @ 2018-01-30 11:53 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault

This avoids assert definition conflicts if some of the headers used by
malloc.c happens to include assert.h.  Malloc still needs a malloc-avoiding
implementation, which we get by redirecting __assert_fail to malloc's
__malloc_assert.

	* malloc/malloc.c: Include <assert.h>.
	(assert): Do not define.
	[!defined NDEBUG] (__assert_fail): Define to __malloc_assert.
---
 ChangeLog       |  3 +++
 malloc/malloc.c | 11 ++++-------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2694f6d363..c6bcba65dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,9 @@
 	|| to respect codestyle.
 	* libio/tst-memstream3.c (_FWRITE): Rename to FWRITE_FUNC.
 	(do_test_bz20181): Rename accordingly.
+	* malloc/malloc.c: Include <assert.h>.
+	(assert): Do not define.
+	[!defined NDEBUG] (__assert_fail): Define to __malloc_assert.
 
 2018-01-29  Darius Rad  <darius@bluespec.com>
 
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 7889fb1961..f8e7250f70 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -223,6 +223,7 @@
 #include <unistd.h>
 #include <stdio.h>    /* needed for malloc_stats */
 #include <errno.h>
+#include <assert.h>
 
 #include <shlib-compat.h>
 
@@ -278,13 +279,9 @@
 #define MALLOC_DEBUG 0
 #endif
 
-#ifdef NDEBUG
-# define assert(expr) ((void) 0)
-#else
-# define assert(expr) \
-  ((expr)								      \
-   ? ((void) 0)								      \
-   : __malloc_assert (#expr, __FILE__, __LINE__, __func__))
+#ifndef NDEBUG
+# define __assert_fail(assertion, file, line, function)			\
+	 __malloc_assert(assertion, file, line, function)
 
 extern const char *__progname;
 
-- 
2.15.1

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

* [hurd,commited 2/6] hurd: Fix ChangeLog date
  2018-01-30  2:12 [hurd,commited 0/6] hurd: fixes against previous hurd commits Samuel Thibault
                   ` (3 preceding siblings ...)
  2018-01-30 11:53 ` [hurd,commited 5/6] malloc: Use assert.h's assert macro Samuel Thibault
@ 2018-01-30 13:14 ` Samuel Thibault
  2018-01-30 22:57   ` Rafal Luzynski
  2018-01-30 13:24 ` [hurd,commited 6/6] hurd: Fix comments for FREAD and FWRITE Samuel Thibault
  5 siblings, 1 reply; 10+ messages in thread
From: Samuel Thibault @ 2018-01-30 13:14 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault

---
 ChangeLog | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 6fefbee51e..873646e685 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -371,7 +371,7 @@
 	* sysdeps/mach/hurd/net/if_ppp.h: Do not include non-existing
 	<net/ppp_defs.h>.
 
-2008-12-18  Thomas Schwinge  <tschwinge@gnu.org>
+2018-01-27  Thomas Schwinge  <tschwinge@gnu.org>
 
 	* hurd/fcntl-internal.h: New file.
 
-- 
2.15.1

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

* [hurd,commited 6/6] hurd: Fix comments for FREAD and FWRITE
  2018-01-30  2:12 [hurd,commited 0/6] hurd: fixes against previous hurd commits Samuel Thibault
                   ` (4 preceding siblings ...)
  2018-01-30 13:14 ` [hurd,commited 2/6] hurd: Fix ChangeLog date Samuel Thibault
@ 2018-01-30 13:24 ` Samuel Thibault
  5 siblings, 0 replies; 10+ messages in thread
From: Samuel Thibault @ 2018-01-30 13:24 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault

	* bits/fcntl.h: Fix comment for FREAD and FWRITE.
	* sysdeps/mach/hurd/bits/fcntl.h: Likewise.
---
 ChangeLog                      | 2 ++
 bits/fcntl.h                   | 5 +----
 sysdeps/mach/hurd/bits/fcntl.h | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c6bcba65dd..f74082f4cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,8 @@
 	* malloc/malloc.c: Include <assert.h>.
 	(assert): Do not define.
 	[!defined NDEBUG] (__assert_fail): Define to __malloc_assert.
+	* bits/fcntl.h: Fix comment for FREAD and FWRITE.
+	* sysdeps/mach/hurd/bits/fcntl.h: Likewise.
 
 2018-01-29  Darius Rad  <darius@bluespec.com>
 
diff --git a/bits/fcntl.h b/bits/fcntl.h
index 7c62303829..671c9e6877 100644
--- a/bits/fcntl.h
+++ b/bits/fcntl.h
@@ -63,10 +63,7 @@
 #endif
 
 #ifdef __USE_MISC
-/* Bits in the file status flags returned by F_GETFL.
-   These are all the O_* flags, plus FREAD and FWRITE, which are
-   independent bits set by which of O_RDONLY, O_WRONLY, and O_RDWR, was
-   given to `open'.  */
+/* Flags for TIOCFLUSH.  */
 # define FREAD		1
 # define FWRITE		2
 
diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h
index cb8a6ff565..2cfaa872a5 100644
--- a/sysdeps/mach/hurd/bits/fcntl.h
+++ b/sysdeps/mach/hurd/bits/fcntl.h
@@ -135,7 +135,7 @@
 
 
 #ifdef __USE_MISC
-/* Bits in the file status flags returned by F_GETFL.  */
+/* Flags for TIOCFLUSH.  */
 # define FREAD		O_RDONLY
 # define FWRITE		O_WRONLY
 
-- 
2.15.1

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

* Re: [hurd,commited 2/6] hurd: Fix ChangeLog date
  2018-01-30 13:14 ` [hurd,commited 2/6] hurd: Fix ChangeLog date Samuel Thibault
@ 2018-01-30 22:57   ` Rafal Luzynski
  2018-01-31 15:02     ` Samuel Thibault
  0 siblings, 1 reply; 10+ messages in thread
From: Rafal Luzynski @ 2018-01-30 22:57 UTC (permalink / raw)
  To: libc-alpha, Samuel Thibault

29.01.2018 23:00 Samuel Thibault <samuel.thibault@ens-lyon.org> wrote:
>
>
> ---
> ChangeLog | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index 6fefbee51e..873646e685 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -371,7 +371,7 @@
> * sysdeps/mach/hurd/net/if_ppp.h: Do not include non-existing
> <net/ppp_defs.h>.
>
> -2008-12-18 Thomas Schwinge <tschwinge@gnu.org>
> +2018-01-27 Thomas Schwinge <tschwinge@gnu.org>

Thank you.  There are more such dates, though:

https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=ChangeLog;h=60058a0;hp=8890b0b;hb=311ba8d;hpb=d7ff3f1

https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=ChangeLog;h=5eac6f0;hp=4f869a9;hb=1a49fc5;hpb=6642518

(The latter is not your change and this is just one day off, may
be caused by just the time zone difference.)

I have not verified whole ChangeLog files, those two are found by
just browsing and just for the last 2 months.

Regards,

Rafal

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

* Re: [hurd,commited 2/6] hurd: Fix ChangeLog date
  2018-01-30 22:57   ` Rafal Luzynski
@ 2018-01-31 15:02     ` Samuel Thibault
  0 siblings, 0 replies; 10+ messages in thread
From: Samuel Thibault @ 2018-01-31 15:02 UTC (permalink / raw)
  To: Rafal Luzynski; +Cc: libc-alpha

Rafal Luzynski, on mar. 30 janv. 2018 11:09:39 +0100, wrote:
> https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=ChangeLog;h=60058a0;hp=8890b0b;hb=311ba8d;hpb=d7ff3f1

Indeed, that was for the same reason, now fixed.

> https://sourceware.org/git/?p=glibc.git;a=blobdiff;f=ChangeLog;h=5eac6f0;hp=4f869a9;hb=1a49fc5;hpb=6642518
> 
> (The latter is not your change and this is just one day off, may
> be caused by just the time zone difference.)

Yes, that can easly happen when people work during the night :)

Samuel

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

* Re: [hurd,commited 3/6] allocalim.h: Fix codestyle
  2018-01-30  4:10 ` [hurd,commited 3/6] allocalim.h: Fix codestyle Samuel Thibault
@ 2018-01-31 15:07   ` Adhemerval Zanella
  0 siblings, 0 replies; 10+ messages in thread
From: Adhemerval Zanella @ 2018-01-31 15:07 UTC (permalink / raw)
  To: libc-alpha



On 29/01/2018 20:00, Samuel Thibault wrote:
> 	* sysdeps/pthread/allocalim.h (__libc_use_alloca): Commute operands of
> 	|| to respect codestyle.
> ---
>  ChangeLog                   | 2 ++
>  sysdeps/pthread/allocalim.h | 6 +++---
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/ChangeLog b/ChangeLog
> index 873646e685..476cb73847 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -13,6 +13,8 @@
>  	* sysdeps/mach/hurd/i386/libresolv.abilist: New file.
>  	* sysdeps/mach/hurd/i386/librt.abilist: New file.
>  	* sysdeps/mach/hurd/i386/libutil.abilist: New file.
> +	* sysdeps/pthread/allocalim.h (__libc_use_alloca): Commute operands of
> +	|| to respect codestyle.
>  
>  2018-01-29  Darius Rad  <darius@bluespec.com>
>  
> diff --git a/sysdeps/pthread/allocalim.h b/sysdeps/pthread/allocalim.h
> index fdae0c251f..38faf57b70 100644
> --- a/sysdeps/pthread/allocalim.h
> +++ b/sysdeps/pthread/allocalim.h
> @@ -24,9 +24,9 @@ extern __always_inline
>  int
>  __libc_use_alloca (size_t size)
>  {
> -  return (
> +  return (__builtin_expect (__libc_alloca_cutoff (size), 1)
>  #ifdef PTHREAD_STACK_MIN
> -          __builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1) ||
> +          || __builtin_expect (size <= PTHREAD_STACK_MIN / 4, 1)
>  #endif
> -          __builtin_expect (__libc_alloca_cutoff (size), 1));
> +	  );
>  }
> 

Since you are touching it, you may use __glibc_likely instead.

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

end of thread, other threads:[~2018-01-30 19:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-30  2:12 [hurd,commited 0/6] hurd: fixes against previous hurd commits Samuel Thibault
2018-01-30  4:10 ` [hurd,commited 3/6] allocalim.h: Fix codestyle Samuel Thibault
2018-01-31 15:07   ` Adhemerval Zanella
2018-01-30  7:54 ` [hurd,commited 4/6] libio: Rename _FWRITE to FWRITE_FUNC Samuel Thibault
2018-01-30 10:09 ` [hurd,commited 1/6] hurd: Fix preprocessor indentation Samuel Thibault
2018-01-30 11:53 ` [hurd,commited 5/6] malloc: Use assert.h's assert macro Samuel Thibault
2018-01-30 13:14 ` [hurd,commited 2/6] hurd: Fix ChangeLog date Samuel Thibault
2018-01-30 22:57   ` Rafal Luzynski
2018-01-31 15:02     ` Samuel Thibault
2018-01-30 13:24 ` [hurd,commited 6/6] hurd: Fix comments for FREAD and FWRITE 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).