public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: Chris Metcalf <cmetcalf@tilera.com>
To: Ulrich Drepper <drepper@gmail.com>
Cc: <libc-alpha@sourceware.org>, <libc-ports@sourceware.org>,
	Arnd Bergmann	<arnd@arndb.de>,
	Linas Vepstas <linas@codeaurora.org>,
	Guan Xuetao	<gxt@mprc.pku.edu.cn>,
	Jonas Bonn <jonas@southpole.se>,
	Chen Liqin	<liqin.chen@gmail.com>
Subject: Re: [PATCH v2 0/10] Tilera (and Linux asm-generic) support for glibc
Date: Fri, 11 Nov 2011 21:58:00 -0000	[thread overview]
Message-ID: <4EBD9A81.7030601@tilera.com> (raw)
In-Reply-To: <4EBD94B4.4050009@tilera.com>

On 11/11/2011 4:33 PM, Chris Metcalf wrote:
> On 11/11/2011 12:48 PM, Ulrich Drepper wrote:
>>  Nothing here belongs into the main version.  Stuff it in the ports
>>  tree.  I'm not modifying the existing files for this supposed
>>  "generic" architecture.
>
> The files in "PATCH v2 8/10" that I added #ifdefs to I've now moved
> into "ports" in my git tree, and we can just make sure they continue
> to track changes in the files they were derived from.
The not-cancel.h header in sysdeps/unix/sysv/linux does still remain
a problem, though, since many .c files in that directory do an
#include "not-cancel.h" and will pick up that version even if there is
one in ports that is nominally ahead of it on the search path.

I think there are two choices.  We can duplicate the dozen-odd files
that use not-cancel.h in that directory into sysdeps/unix/sys/linux/generic,
or we can apply just one #ifdef to handle the case where we need
to use __NR_openat instead of __NR_open.  I suspect the patch to
not-cancel.h is small enough that it's worth not duplicating the
dozen-odd C files (about 2,700 lines total).

But, I'm certainly happy to follow the engineering instincts of
the maintainers.  The patch is basically this (modulo indentation):

  #include<sys/types.h>
  #include<sysdep.h>
+#ifndef __NR_open
+#include<fcntl.h>
+#endif

  /* Uncancelable open.  */
+#ifdef __NR_open
  #define open_not_cancel(name, flags, mode) \
     INLINE_SYSCALL (open, 3, (const char *) (name), (flags), (mode))
  #define open_not_cancel_2(name, flags) \
     INLINE_SYSCALL (open, 2, (const char *) (name), (flags))
+#else
+#define open_not_cancel(name, flags, mode) \
+   INLINE_SYSCALL (openat, 4, AT_FDCWD, (const char *) (name), (flags), (mode))
+#define open_not_cancel_2(name, flags) \
+   INLINE_SYSCALL (openat, 3, AT_FDCWD, (const char *) (name), (flags))
+#endif

  /* Uncancelable openat.  */
  #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt


-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com

  parent reply	other threads:[~2011-11-11 21:58 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-10  0:55 Chris Metcalf
2011-11-10  0:58 ` [PATCH v2 2/10] " Chris Metcalf
2011-11-15  0:32   ` Joseph S. Myers
2011-11-10  4:14 ` [PATCH v2 0/10] " Mike Frysinger
2011-11-10  4:27   ` Chris Metcalf
2011-11-11 18:10     ` Roland McGrath
2011-11-11 18:35       ` Carlos O'Donell
2011-11-11 19:07         ` Roland McGrath
2011-11-11 19:22           ` Carlos O'Donell
2011-11-10  4:36 ` [PATCH v2 1a/10] sysdeps/tile support Chris Metcalf
2011-11-15  0:00   ` Joseph S. Myers
2011-11-15 15:54     ` Joseph S. Myers
2011-11-15 18:14       ` Chris Metcalf
2011-11-20 17:06         ` Joseph S. Myers
2011-11-20 17:34           ` Chris Metcalf
2011-11-20 17:48             ` Joseph S. Myers
2011-11-21 14:14             ` Carlos O'Donell
2011-11-21 14:41               ` Chris Metcalf
2011-12-04  0:02           ` Chris Metcalf
2011-12-04  0:28             ` Chris Metcalf
2011-12-04  1:17               ` Joseph S. Myers
2011-12-04  4:13                 ` Christopher Faylor
2011-12-04  9:35                   ` Andreas Schwab
2011-12-04  0:47       ` Chris Metcalf
2011-12-04  1:17         ` Joseph S. Myers
     [not found] ` <201111100435.pAA4ZuEh008673@farm-0002.internal.tilera.com>
2011-11-10  5:21   ` [PATCH v2 1b/10] sysdeps/unix/sysv/linux/tile support Chris Metcalf
2011-11-15  0:06     ` Joseph S. Myers
2011-11-15  3:32       ` Chris Metcalf
2011-11-11 17:48 ` [PATCH v2 0/10] Tilera (and Linux asm-generic) support for glibc Ulrich Drepper
2011-11-11 21:02   ` Mike Frysinger
2011-11-11 21:33   ` Chris Metcalf
2011-11-11 21:42     ` Roland McGrath
2011-11-12  2:43       ` Arnd Bergmann
2011-11-12  3:16         ` Roland McGrath
2011-11-12 15:05         ` Joseph S. Myers
2011-11-14 22:17           ` Arnd Bergmann
2011-11-14 23:38             ` Joseph S. Myers
2011-11-15  5:38               ` Arnd Bergmann
2011-11-15 16:15                 ` Joseph S. Myers
2011-11-15 17:43                   ` Richard Earnshaw
2011-11-15 17:50                     ` Joseph S. Myers
2011-11-15 17:46                   ` Arnd Bergmann
2011-11-15 18:05                     ` Joseph S. Myers
2011-11-15 17:21                 ` Richard Earnshaw
2011-11-15 17:45                   ` Joseph S. Myers
2011-11-15 17:50                     ` Richard Earnshaw
2011-11-11 21:58     ` Chris Metcalf [this message]
2011-11-11 22:15       ` Roland McGrath

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EBD9A81.7030601@tilera.com \
    --to=cmetcalf@tilera.com \
    --cc=arnd@arndb.de \
    --cc=drepper@gmail.com \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=jonas@southpole.se \
    --cc=libc-alpha@sourceware.org \
    --cc=libc-ports@sourceware.org \
    --cc=linas@codeaurora.org \
    --cc=liqin.chen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).