Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(701)

Issue 579270051: Issue 5720: Add enabling extension definitions for `-std=c++11` option

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 1 month ago by trueroad
Modified:
4 years, 1 month ago
Reviewers:
Dan Eble, lemzwerg
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Issue 5720: Add enabling extension definitions for `-std=c++11` option The compiler option `-std=c++11` means to follow the strict C++11 standard, and cannot use several extensions such as POSIX functions/definitions (e.g. M_PI, strdup, putenv, and chroot). With the option, some environments (e.g. Linux) can use the extensions as it is, but other environments require definitions (e.g. `_GNU_SOURCE`) to enable the extensions. This commit makes configure script checks the environments and adds the definitions.

Patch Set 1 #

Patch Set 2 : use AC_USE_SYSTEM_EXTENSIONS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -1 line) Patch
M config.hh.in View 1 1 chunk +21 lines, -1 line 0 comments Download
M configure.ac View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 13
lemzwerg
Mhmm, wouldn't it be better to simply define `M_PI` if it is not defined? GNU ...
4 years, 1 month ago (2020-02-01 07:10:17 UTC) #1
trueroad
On 2020/02/01 07:10:17, lemzwerg wrote: > Mhmm, wouldn't it be better to simply define `M_PI` ...
4 years, 1 month ago (2020-02-01 08:04:36 UTC) #2
Dan Eble
Preliminary reaction: I don't like it. This might be a case of missing includes which ...
4 years, 1 month ago (2020-02-01 11:42:01 UTC) #3
Dan Eble
On 2020/02/01 08:04:36, trueroad wrote: > Even if we define `M_PI`, an error raises since ...
4 years, 1 month ago (2020-02-01 12:06:02 UTC) #4
Dan Eble
On 2020/02/01 12:06:02, Dan Eble wrote: > I see two uses of strdup. > The ...
4 years, 1 month ago (2020-02-01 12:13:24 UTC) #5
trueroad
In `-std=c++11`, most POSIX functions/definitions cannot be used. Also `putenv ()` and `chroot ()` cannot ...
4 years, 1 month ago (2020-02-01 15:04:41 UTC) #6
Dan Eble
On 2020/02/01 15:04:41, trueroad wrote: > In `-std=c++11`, most POSIX functions/definitions cannot be used. > ...
4 years, 1 month ago (2020-02-01 17:04:11 UTC) #7
Dan Eble
On 2020/02/01 12:06:02, Dan Eble wrote: > I see two uses of strdup. > The ...
4 years, 1 month ago (2020-02-01 18:38:47 UTC) #8
lemzwerg
> In `-std=c++11`, most POSIX functions/definitions cannot > be used. > Also `putenv ()` and ...
4 years, 1 month ago (2020-02-01 18:55:50 UTC) #9
trueroad
use AC_USE_SYSTEM_EXTENSIONS
4 years, 1 month ago (2020-02-02 04:46:48 UTC) #10
trueroad
On 2020/02/01 18:55:50, lemzwerg wrote: > > In `-std=c++11`, most POSIX functions/definitions cannot > > ...
4 years, 1 month ago (2020-02-02 04:52:23 UTC) #11
lemzwerg
LGTM now, thanks!
4 years, 1 month ago (2020-02-02 05:39:19 UTC) #12
trueroad
4 years, 1 month ago (2020-02-06 12:12:26 UTC) #13
I've pushed.

commit 7396a28bde310c5f43d7dcbd3dfc8f708726f3de
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b