diff mbox

manual: unmark locale from addmntent and putpwent

Message ID 1416822086-13020-1-git-send-email-mashimiao.fnst@cn.fujitsu.com
State RFC, archived
Headers show

Commit Message

Ma Shimiao Nov. 24, 2014, 9:41 a.m. UTC
fprintf will use locale relative macros in the following two status:
 1) the format passed to fprintf has "\'" character
 2) the format passed to fprintf has custom format specifier
when calling fprintf, addmntent and putpwent do not meet any one of
the above conditions.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
---
 manual/sysinfo.texi | 4 ++--
 manual/users.texi   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Ma Shimiao March 3, 2015, 7:32 a.m. UTC | #1
Ping

On 11/24/2014 05:41 PM, Ma Shimiao wrote:
>  fprintf will use locale relative macros in the following two status:
>  1) the format passed to fprintf has "\'" character
>  2) the format passed to fprintf has custom format specifier
> when calling fprintf, addmntent and putpwent do not meet any one of
> the above conditions.
> 
> Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
> ---
>  manual/sysinfo.texi | 4 ++--
>  manual/users.texi   | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/manual/sysinfo.texi b/manual/sysinfo.texi
> index e6c44d6..e9cef36 100644
> --- a/manual/sysinfo.texi
> +++ b/manual/sysinfo.texi
> @@ -790,8 +790,8 @@ end of file reached,
>  @comment mntent.h
>  @comment BSD
>  @deftypefun int addmntent (FILE *@var{stream}, const struct mntent *@var{mnt})
> -@safety{@prelim{}@mtsafe{@mtsrace{:stream} @mtslocale{}}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{}}}
> -@c addmntent @mtasurace:stream @mtslocale @asucorrupt @acucorrupt
> +@safety{@prelim{}@mtsafe{@mtsrace{:stream}}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{}}}
> +@c addmntent @mtsrace:stream @asucorrupt @acucorrupt
>  @c  fseek dup @asucorrupt @acucorrupt [no @aculock]
>  @c  encode_name ok
>  @c  fprintf dup @mtslocale @asucorrupt @acucorrupt [no @ascuheap @acsmem, no @aculock]
> diff --git a/manual/users.texi b/manual/users.texi
> index e8f0f3b..6123998 100644
> --- a/manual/users.texi
> +++ b/manual/users.texi
> @@ -2313,8 +2313,8 @@ This function closes the internal stream used by @code{getpwent} or
>  @comment pwd.h
>  @comment SVID
>  @deftypefun int putpwent (const struct passwd *@var{p}, FILE *@var{stream})
> -@safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@asucorrupt{}}@acunsafe{@aculock{} @acucorrupt{}}}
> -@c putpwent @mtslocale @asucorrupt @aculock @acucorrupt
> +@safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@aculock{} @acucorrupt{}}}
> +@c putpwent @asucorrupt @aculock @acucorrupt
>  @c  fprintf dup @mtslocale @asucorrupt @aculock @acucorrupt [no @ascuheap @acsmem]
>  This function writes the user entry @code{*@var{p}} to the stream
>  @var{stream}, in the format used for the standard user database
>
Florian Weimer March 3, 2015, 10:35 a.m. UTC | #2
On 11/24/2014 10:41 AM, Ma Shimiao wrote:
>  fprintf will use locale relative macros in the following two status:
>  1) the format passed to fprintf has "\'" character
>  2) the format passed to fprintf has custom format specifier
> when calling fprintf, addmntent and putpwent do not meet any one of
> the above conditions.

See my other comment regarding the decimal separator.  I think this
patch is still valid (addmntent and putpwent do not use floating point),
so this looks good to me.
diff mbox

Patch

diff --git a/manual/sysinfo.texi b/manual/sysinfo.texi
index e6c44d6..e9cef36 100644
--- a/manual/sysinfo.texi
+++ b/manual/sysinfo.texi
@@ -790,8 +790,8 @@  end of file reached,
 @comment mntent.h
 @comment BSD
 @deftypefun int addmntent (FILE *@var{stream}, const struct mntent *@var{mnt})
-@safety{@prelim{}@mtsafe{@mtsrace{:stream} @mtslocale{}}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{}}}
-@c addmntent @mtasurace:stream @mtslocale @asucorrupt @acucorrupt
+@safety{@prelim{}@mtsafe{@mtsrace{:stream}}@asunsafe{@asucorrupt{}}@acunsafe{@acucorrupt{}}}
+@c addmntent @mtsrace:stream @asucorrupt @acucorrupt
 @c  fseek dup @asucorrupt @acucorrupt [no @aculock]
 @c  encode_name ok
 @c  fprintf dup @mtslocale @asucorrupt @acucorrupt [no @ascuheap @acsmem, no @aculock]
diff --git a/manual/users.texi b/manual/users.texi
index e8f0f3b..6123998 100644
--- a/manual/users.texi
+++ b/manual/users.texi
@@ -2313,8 +2313,8 @@  This function closes the internal stream used by @code{getpwent} or
 @comment pwd.h
 @comment SVID
 @deftypefun int putpwent (const struct passwd *@var{p}, FILE *@var{stream})
-@safety{@prelim{}@mtsafe{@mtslocale{}}@asunsafe{@asucorrupt{}}@acunsafe{@aculock{} @acucorrupt{}}}
-@c putpwent @mtslocale @asucorrupt @aculock @acucorrupt
+@safety{@prelim{}@mtsafe{}@asunsafe{@asucorrupt{}}@acunsafe{@aculock{} @acucorrupt{}}}
+@c putpwent @asucorrupt @aculock @acucorrupt
 @c  fprintf dup @mtslocale @asucorrupt @aculock @acucorrupt [no @ascuheap @acsmem]
 This function writes the user entry @code{*@var{p}} to the stream
 @var{stream}, in the format used for the standard user database