Skip to contentSkip to conversation

mkstemp: fix _POSIX_C_SOURCE value for mkstemp()

PATCH Quentin Rameau 3 participants 9 messages Jul 8, 2016 – Aug 4, 2016 6 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

Here are more informations to save you the time searching for it. Introduced in f095bb7 (2010-01-09) in stdlib/stdlib.h line 609:

+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
+ || defined __USE_XOPEN2K8
[..]
extern int mkstemp (char *__template) __nonnull ((1)) __wur;

And in include/features.h (from glibc 2.12 e28c887):

#if (_POSIX_C_SOURCE - 0) >= 200112L

# define __USE_XOPEN2K		1
# undef __USE_ISOC95
# define __USE_ISOC95		1
# undef __USE_ISOC99
# define __USE_ISOC99		1
#endif

#if (_POSIX_C_SOURCE - 0) >= 200809L

# define __USE_XOPEN2K8		1
# undef  _ATFILE_SOURCE
# define _ATFILE_SOURCE	1
#endif

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20160708000626.GA26576-lvRy8M+iZ/[email protected]

#2 lore raw

*ping*

Forgive me for being insistant, but as there has been no response to this thread, and with all the spam thas has been going on on the ml in the last few days, I'm thinking maybe you didn't see it pass. Or maybe you just don't find it acceptable, then a response would be appreciated anyway.
Thanks for your time!

Quoted 24 lines

Here are more informations to save you the time searching for it. Introduced in f095bb7 (2010-01-09) in stdlib/stdlib.h line 609:

(quoted diff) +2 -0
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
+    || defined __USE_XOPEN2K8
[..]

extern int mkstemp (char *__template) __nonnull ((1)) __wur;

And in include/features.h (from glibc 2.12 e28c887):

#if (_POSIX_C_SOURCE - 0) >= 200112L

# define __USE_XOPEN2K		1
# undef __USE_ISOC95
# define __USE_ISOC95		1
# undef __USE_ISOC99
# define __USE_ISOC99		1
#endif

#if (_POSIX_C_SOURCE - 0) >= 200809L

# define __USE_XOPEN2K8		1
# undef  _ATFILE_SOURCE
# define _ATFILE_SOURCE	1
#endif
Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20160714093249.GA25778-lvRy8M+iZ/[email protected]

#4 lore raw

*ping*

Quoted 33 lines

*ping*

Forgive me for being insistant, but as there has been no response to this thread, and with all the spam thas has been going on on the ml in the last few days, I'm thinking maybe you didn't see it pass. Or maybe you just don't find it acceptable, then a response would be appreciated anyway.
Thanks for your time!

Quoted 24 lines

Here are more informations to save you the time searching for it. Introduced in f095bb7 (2010-01-09) in stdlib/stdlib.h line 609:

(quoted diff) +2 -0
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
+    || defined __USE_XOPEN2K8
[..]

extern int mkstemp (char *__template) __nonnull ((1)) __wur;

And in include/features.h (from glibc 2.12 e28c887):

#if (_POSIX_C_SOURCE - 0) >= 200112L

# define __USE_XOPEN2K		1
# undef __USE_ISOC95
# define __USE_ISOC95		1
# undef __USE_ISOC99
# define __USE_ISOC99		1
#endif

#if (_POSIX_C_SOURCE - 0) >= 200809L

# define __USE_XOPEN2K8		1
# undef  _ATFILE_SOURCE
# define _ATFILE_SOURCE	1
#endif
Quoted 8 lines
Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe
linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

*ping*

Quoted 44 lines

*ping*

Quoted 33 lines

*ping*

Forgive me for being insistant, but as there has been no response to this thread, and with all the spam thas has been going on on the ml in the last few days, I'm thinking maybe you didn't see it pass. Or maybe you just don't find it acceptable, then a response would be appreciated anyway.
Thanks for your time!

Quoted 24 lines

Here are more informations to save you the time searching for it. Introduced in f095bb7 (2010-01-09) in stdlib/stdlib.h line 609:

(quoted diff) +2 -0
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
+    || defined __USE_XOPEN2K8
[..]

extern int mkstemp (char *__template) __nonnull ((1)) __wur;

And in include/features.h (from glibc 2.12 e28c887):

#if (_POSIX_C_SOURCE - 0) >= 200112L

# define __USE_XOPEN2K		1
# undef __USE_ISOC95
# define __USE_ISOC95		1
# undef __USE_ISOC99
# define __USE_ISOC99		1
#endif

#if (_POSIX_C_SOURCE - 0) >= 200809L

# define __USE_XOPEN2K8		1
# undef  _ATFILE_SOURCE
# define _ATFILE_SOURCE	1
#endif
Quoted 8 lines
Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe
linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
In reply to a message not in the archive
Quoted 18 lines · Quentin Rameau

Here are more informations to save you the time searching for it. Introduced in f095bb7 (2010-01-09) in stdlib/stdlib.h line 609:

(quoted diff) +2 -0
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
+    || defined __USE_XOPEN2K8
[..]

extern int mkstemp (char *__template) __nonnull ((1)) __wur;

And in include/features.h (from glibc 2.12 e28c887):

#if (_POSIX_C_SOURCE - 0) >= 200112L

# define __USE_XOPEN2K		1
# undef __USE_ISOC95
# define __USE_ISOC95		1
# undef __USE_ISOC99
# define __USE_ISOC99		1
#endif
Quoted 5 lines

#if (_POSIX_C_SOURCE - 0) >= 200809L

# define __USE_XOPEN2K8		1
# undef  _ATFILE_SOURCE
# define _ATFILE_SOURCE	1
#endif

what is it you're trying to report ? the man page already reads:

       mkstemp():
           _XOPEN_SOURCE >= 500
               || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200112L
               || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

can you attach a patch ?
-mike

A message that is not in the archive (sent off-list or not yet received): [email protected]

#9 lore raw

Hi, thanks for the response!

Quoted 25 lines · Quentin Rameau
Quoted 18 lines

Here are more informations to save you the time searching for it. Introduced in f095bb7 (2010-01-09) in stdlib/stdlib.h line 609:

(quoted diff) +2 -0
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
+    || defined __USE_XOPEN2K8
[..]

extern int mkstemp (char *__template) __nonnull ((1)) __wur;

And in include/features.h (from glibc 2.12 e28c887):

#if (_POSIX_C_SOURCE - 0) >= 200112L

# define __USE_XOPEN2K		1
# undef __USE_ISOC95
# define __USE_ISOC95		1
# undef __USE_ISOC99
# define __USE_ISOC99		1
#endif
Quoted 5 lines

#if (_POSIX_C_SOURCE - 0) >= 200809L

# define __USE_XOPEN2K8		1
# undef  _ATFILE_SOURCE
# define _ATFILE_SOURCE	1
#endif
Quoted 5 lines

what is it you're trying to report ? the man page already reads:

       mkstemp():
           _XOPEN_SOURCE >= 500
               || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200112L
               || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

Yes, that's the whole point, it is incorrect!
mkstemp is declared with __USE_XOPEN2K8 defined, which occurs when _POSIX_C_SOURCE is defined to 200809L, not 200112L as it is incorrectly stated in the current manpage version.

Quoted 2 lines

can you attach a patch ?
-mike

Of course, already did that in fact, that's the first mail of the thread.
I can link the marc.info archive to you if that can help:
http://marc.info/?l=linux-man&m=146737548209893

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20160803113131.GA24366-lvRy8M+iZ/[email protected]

#11 lore raw

Hello Quentin

For some reasons, all of your earlier mails got marked as spam by gmail, and so I did not see them. However, Mike's reply came through okay, and so I saw this at last.

Quoted 38 lines · Quentin Rameau

Hi, thanks for the response!

Quoted 25 lines · Quentin Rameau
Quoted 18 lines

Here are more informations to save you the time searching for it. Introduced in f095bb7 (2010-01-09) in stdlib/stdlib.h line 609:

(quoted diff) +2 -0
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \
+    || defined __USE_XOPEN2K8
[..]

extern int mkstemp (char *__template) __nonnull ((1)) __wur;

And in include/features.h (from glibc 2.12 e28c887):

#if (_POSIX_C_SOURCE - 0) >= 200112L

# define __USE_XOPEN2K		1
# undef __USE_ISOC95
# define __USE_ISOC95		1
# undef __USE_ISOC99
# define __USE_ISOC99		1
#endif
Quoted 5 lines

#if (_POSIX_C_SOURCE - 0) >= 200809L

# define __USE_XOPEN2K8		1
# undef  _ATFILE_SOURCE
# define _ATFILE_SOURCE	1
#endif
Quoted 5 lines

what is it you're trying to report ? the man page already reads:

       mkstemp():
           _XOPEN_SOURCE >= 500
               || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200112L
               || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

Yes, that's the whole point, it is incorrect!
mkstemp is declared with __USE_XOPEN2K8 defined, which occurs when _POSIX_C_SOURCE is defined to 200809L, not 200112L as it is incorrectly stated in the current manpage version.

Quoted 7 lines
Quoted 2 lines

can you attach a patch ?
-mike

Of course, already did that in fact, that's the first mail of the thread.
I can link the marc.info archive to you if that can help:
http://marc.info/?l=linux-man&m=146737548209893

Thanks for catching this. I've applied your patch.

Cheers,

Michael

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 5f03a2c7-3535-8203-c6f2-559939350552-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#13 lore raw
Quoted 5 lines · Michael Kerrisk (man-pages)

Hello Quentin

For some reasons, all of your earlier mails got marked as spam by gmail, and so I did not see them. However, Mike's reply came through okay, and so I saw this at last.

No problem, indeed that happens!

Quoted 1 line

Thanks for catching this. I've applied your patch.

Thanks to you!
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#14 lore raw
In reply to a message not in the archive
Quoted 4 lines · Quentin Rameau
Quoted 1 line

can you attach a patch ?

Of course, already did that in fact, that's the first mail of the thread.

i replied to the first e-mail in the thread that i saw which didn't include a patch
-mike