Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: gdb/gnulib/import/m4/fcntl-o.m4

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/gnulib/import/m4/extern-inline.m4 ('k') | gdb/gnulib/import/m4/float_h.m4 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/gnulib/import/m4/fcntl-o.m4
diff --git a/gdb/gnulib/import/m4/fcntl-o.m4 b/gdb/gnulib/import/m4/fcntl-o.m4
index 9862741f3943c38cc2269b8a582c5c4294ddf942..740e78b681987ec062b4db9e8fe8705a3a34b149 100644
--- a/gdb/gnulib/import/m4/fcntl-o.m4
+++ b/gdb/gnulib/import/m4/fcntl-o.m4
@@ -50,7 +50,18 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
#if HAVE_SYMLINK
{
static char const sym[] = "conftest.sym";
- if (symlink (".", sym) != 0)
+ if (symlink ("/dev/null", sym) != 0)
+ result |= 2;
+ else
+ {
+ int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+ if (fd >= 0)
+ {
+ close (fd);
+ result |= 4;
+ }
+ }
+ if (unlink (sym) != 0 || symlink (".", sym) != 0)
result |= 2;
else
{
« no previous file with comments | « gdb/gnulib/import/m4/extern-inline.m4 ('k') | gdb/gnulib/import/m4/float_h.m4 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698