You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
If "_REENTRANT" is defined in the header file, we should use "-D_REENTRANT" when compiling #82482
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/jcea'closed_at=<Date2019-09-28.04:39:57.003>created_at=<Date2019-09-27.21:35:16.099>labels= ['3.8', 'build', '3.7', '3.9']
title='If "_REENTRANT" is defined in the header file, we should use "-D_REENTRANT" when compiling'updated_at=<Date2019-09-28.06:31:34.512>user='https://github.com/jcea'
When compiling on Solaris family, we define "_REENTRANT" in "Pyconfig.h". That file is included when compiling C extensions, but if the extension is made of several C files, it could be included only in the file that interfaces with python runtime.
Unfortunately, "_REENTRANT" modifies the way C code is compiled, so compiling a C extension with some source files with "_REENTRANT" and some other without that "define" can produce bizarre errors and crashes.
changed the title [-]If "_REENTARNT" is defined in the header file, we should use "-D_REENTRANT" when compiling[/-][+]If "_REENTRANT" is defined in the header file, we should use "-D_REENTRANT" when compiling[/+]on Sep 27, 2019
New changeset 8750bce by Jesús Cea (Miss Islington (bot)) in branch '3.8': bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (bpo-16449) 8750bce
New changeset 6112b91 by Jesús Cea (Miss Islington (bot)) in branch '3.7': bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (bpo-16450) 6112b91
Activity
jcea commentedon Sep 27, 2019
When compiling on Solaris family, we define "_REENTRANT" in "Pyconfig.h". That file is included when compiling C extensions, but if the extension is made of several C files, it could be included only in the file that interfaces with python runtime.
Unfortunately, "_REENTRANT" modifies the way C code is compiled, so compiling a C extension with some source files with "_REENTRANT" and some other without that "define" can produce bizarre errors and crashes.
One example: TritonDataCenter/pkgsrc#207
In particular, "include" order can make a big difference: jnwatson/py-lmdb#213
I suggest that when "_REENTRANT" is defined in "Pyconfig.h", Python C extensions compilation machinery adds "-D_REENTRANT" to the compilation flags.
The patch is trivial.
[-]If "_REENTARNT" is defined in the header file, we should use "-D_REENTRANT" when compiling[/-][+]If "_REENTRANT" is defined in the header file, we should use "-D_REENTRANT" when compiling[/+]jcea commentedon Sep 28, 2019
New changeset 52d1b86 by Jesús Cea in branch 'master':
bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (bpo-16446)
52d1b86
jcea commentedon Sep 28, 2019
New changeset 8750bce by Jesús Cea (Miss Islington (bot)) in branch '3.8':
bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (bpo-16449)
8750bce
jcea commentedon Sep 28, 2019
New changeset 6112b91 by Jesús Cea (Miss Islington (bot)) in branch '3.7':
bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (bpo-16450)
6112b91
jcea commentedon Sep 28, 2019
New changeset 598f676 by Jesús Cea in branch '2.7':
[2.7] bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446). (bpo-16454)
598f676