From: Paul Eggert <eggert@cs.ucla.edu>
To: Ken Brown <kbrown@cornell.edu>, 30176@debbugs.gnu.org
Subject: bug#30176: readlinkat and _FORTIFY_SOURCE on Cygwin
Date: Fri, 19 Jan 2018 15:25:02 -0800 [thread overview]
Message-ID: <884dbad2-610c-63c5-679d-4b1549afac32@cs.ucla.edu> (raw)
In-Reply-To: <27a80447-e39b-0099-6063-1ab3517f668c@cornell.edu>
On 01/19/2018 12:46 PM, Ken Brown wrote:
> I can think of three possibilities, but maybe there's something better:
>
> 1. Add "#define _FORTIFY_SOURCE 0' at the top of fileio.c (Cygwin only).
>
> 2. Pretend like Cygwin doesn't have readlinkat. Then gnulib will
> create its own definition, which will be found by the linker in
> libegnu.a.
>
> 3. Ask gnulib to come up with a fix.
(2) is presumably not good, since the substitute readlinkat will have to
execute several system calls and this will be problematic.
(1) should work but kind of misses the point of fortification.
I don't know what would be involved in (3).
How about a better option, like this:
4. Fix Cygwin readlinkat so that it can be used as a function pointer
even when _FORTIFY_SOURCE is used.
Why not do what glibc does with readlinkat? It fortifies readlinkat, and
doesn't run into this problem.
next prev parent reply other threads:[~2018-01-19 23:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 20:46 bug#30176: readlinkat and _FORTIFY_SOURCE on Cygwin Ken Brown
2018-01-19 23:25 ` Paul Eggert [this message]
2018-01-20 12:30 ` Ken Brown
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=884dbad2-610c-63c5-679d-4b1549afac32@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=30176@debbugs.gnu.org \
--cc=kbrown@cornell.edu \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.