ubsan: aarch64: left shift of negative value
[deliverable/binutils-gdb.git] / gnulib / patches / 0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch
CommitLineData
b3279b60
TT
1From 6954995dd32ea98a1973df31f411f3996bb47dfb Mon Sep 17 00:00:00 2001
2From: Tom Tromey <tom@tromey.com>
3Date: Mon, 1 Oct 2018 14:57:45 -0600
4Subject: [PATCH] mkostemp, mkostemps: Fix compilation error in C++ mode on Mac
5 OS X.
6
7Attempting to use the mkostemp module in gdb caused a build failure
8when using the C++ namespace feature, because mkostemp was not
9declared. On OS X, mkostemp is declared in unistd.h, so this patch
10extends the existing special case in stdlib.in.h to cover mkostemp and
11mkostemps.
12
13* lib/stdlib.in.h: Include <unistd.h> for mkostemp and mkostemps
14on OS X.
15---
16 ChangeLog | 6 ++++++
17 lib/stdlib.in.h | 3 ++-
18 2 files changed, 8 insertions(+), 1 deletion(-)
19
20diff --git a/gdb/gnulib/import/stdlib.in.h b/gdb/gnulib/import/stdlib.in.h
21index db3253bd97..8f803a2ea3 100644
22--- a/gdb/gnulib/import/stdlib.in.h
23+++ b/gdb/gnulib/import/stdlib.in.h
24@@ -87,9 +87,10 @@ struct random_data
25 # endif
26 #endif
27
28-#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
29+#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_MKOSTEMP@ || @GNULIB_MKOSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
30 /* On Mac OS X 10.3, only <unistd.h> declares mkstemp. */
31 /* On Mac OS X 10.5, only <unistd.h> declares mkstemps. */
32+/* On Mac OS X 10.13, only <unistd.h> declares mkostemp and mkostemps. */
33 /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
34 /* But avoid namespace pollution on glibc systems and native Windows. */
35 # include <unistd.h>
36--
372.19.0
38
This page took 0.097734 seconds and 4 git commands to generate.