public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Fix declaration of vsscanf on hpux
@ 2016-02-01  1:03 John David Anglin
  2016-02-01 16:26 ` Bruce Korb
  0 siblings, 1 reply; 2+ messages in thread
From: John David Anglin @ 2016-02-01  1:03 UTC (permalink / raw)
  To: GCC Patches; +Cc: bkorb

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]

The attached hack fixes missing const from the first argument of the declararation for vsscanf on hpux.
This has been present forever.  sscanf is correctly declared, so I presume this is a typo.

I limited the fix to hpux since stage3 is over.

Tested on hppa2.0w-hp-hpux11.11.

Committed to trunk.

Dave
--
John David Anglin	dave.anglin@bell.net



[-- Attachment #2: inclhack-vsscanf.d.txt --]
[-- Type: text/plain, Size: 1300 bytes --]

2016-01-31  John David Anglin  <danglin@gcc.gnu.org>

	PR target/68741
	* inclhack.def (hpux_vsscanf): New fix.
	* fixincl.x: Regenerated.
	* tests/base/stdio.h [HPUX_VSSCANF_CHECK]: New test.

Index: inclhack.def
===================================================================
--- inclhack.def	(revision 232999)
+++ inclhack.def	(working copy)
@@ -2273,6 +2273,20 @@
 };
 
 /*
+ *  Fix missing const in hpux vsscanf declaration
+ */
+fix = {
+    hackname = hpux_vsscanf;
+    mach    = "*-*-hpux*";
+    files   = stdio.h;
+    select  = '(extern int vsscanf\()char';
+    c_fix   = format;
+    c_fix_arg = "%1const char";
+
+    test_text = 'extern int vsscanf(char *, const char *, __va_list);';
+};
+
+/*
  *  get rid of bogus inline definitions in HP-UX 8.0
  */
 fix = {
Index: tests/base/stdio.h
===================================================================
--- tests/base/stdio.h	(revision 232999)
+++ tests/base/stdio.h	(working copy)
@@ -59,6 +59,11 @@
 #endif  /* HPUX11_VSNPRINTF_CHECK */
 
 
+#if defined( HPUX_VSSCANF_CHECK )
+extern int vsscanf(const char *, const char *, __gnuc_va_list);
+#endif  /* HPUX_VSSCANF_CHECK */
+
+
 #if defined( IRIX_STDIO_DUMMY_VA_LIST_CHECK )
 extern int printf( const char *, __gnuc_va_list );
 #endif  /* IRIX_STDIO_DUMMY_VA_LIST_CHECK */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [committed] Fix declaration of vsscanf on hpux
  2016-02-01  1:03 [committed] Fix declaration of vsscanf on hpux John David Anglin
@ 2016-02-01 16:26 ` Bruce Korb
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Korb @ 2016-02-01 16:26 UTC (permalink / raw)
  To: John David Anglin, GCC Patches

On 01/31/16 17:03, John David Anglin wrote:
> The attached hack fixes missing const from the first argument of the declararation for vsscanf on hpux.

Approved for all active dev branches.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-01 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-01  1:03 [committed] Fix declaration of vsscanf on hpux John David Anglin
2016-02-01 16:26 ` Bruce Korb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).