public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug manual/13058] New: Examples in glibc manual are inconsistent in declarations of main()
@ 2011-08-05 16:59 rafe.kettler at gmail dot com
  2012-01-04 20:01 ` [Bug manual/13058] " aj at suse dot de
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rafe.kettler at gmail dot com @ 2011-08-05 16:59 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13058

           Summary: Examples in glibc manual are inconsistent in
                    declarations of main()
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: manual
        AssignedTo: roland@gnu.org
        ReportedBy: rafe.kettler@gmail.com


Created attachment 5876
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5876
Patch for main() signatures in glibc manual. Generated by git diff

Different examples in the manual use varying declarations for main(), some of
which are outdated or non-standard.

manual/examples/longopt.c uses a pre-standard declaration for main like so:

    int 
    main(argc, argv)
         int argc;
         char **argv;

manual/examples/strncat.c uses a main() with no return type declared:

    main()

Those are the only examples that are blatantly anachronistic. There is one more
inconsistency in manual/examples/subopt.c, however, which uses a a different
style for declaring main than all of the other examples. subopt.c uses:

    int 
    main(int argc, char *argv[])

while all of the other examples use:

    int main(int argc, char **argv)

The former is inconsistent with the latter, and the latter is inconsistent with
the GNU coding standards.

Attached is a patch (generated by `git diff > main_signatures.patch` that
changes the signature of every main() in the examples to be either:

    int
    main (void)

or

    int
    main (int argc, char **argv)

Thanks for your time.

PS: if someone needs a different kind of patch, I'd be happy to generate a
different kind of patch.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug manual/13058] Examples in glibc manual are inconsistent in declarations of main()
  2011-08-05 16:59 [Bug manual/13058] New: Examples in glibc manual are inconsistent in declarations of main() rafe.kettler at gmail dot com
@ 2012-01-04 20:01 ` aj at suse dot de
  2012-02-18  0:13 ` jsm28 at gcc dot gnu.org
  2014-06-27 12:44 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: aj at suse dot de @ 2012-01-04 20:01 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13058

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aj at suse dot de

--- Comment #1 from Andreas Jaeger <aj at suse dot de> 2012-01-04 20:00:29 UTC ---
Patch looks ok.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug manual/13058] Examples in glibc manual are inconsistent in declarations of main()
  2011-08-05 16:59 [Bug manual/13058] New: Examples in glibc manual are inconsistent in declarations of main() rafe.kettler at gmail dot com
  2012-01-04 20:01 ` [Bug manual/13058] " aj at suse dot de
@ 2012-02-18  0:13 ` jsm28 at gcc dot gnu.org
  2014-06-27 12:44 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-02-18  0:13 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13058

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-02-18 00:13:35 UTC ---
Thanks, committed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug manual/13058] Examples in glibc manual are inconsistent in declarations of main()
  2011-08-05 16:59 [Bug manual/13058] New: Examples in glibc manual are inconsistent in declarations of main() rafe.kettler at gmail dot com
  2012-01-04 20:01 ` [Bug manual/13058] " aj at suse dot de
  2012-02-18  0:13 ` jsm28 at gcc dot gnu.org
@ 2014-06-27 12:44 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-27 12:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=13058

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

end of thread, other threads:[~2014-06-27 12:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-05 16:59 [Bug manual/13058] New: Examples in glibc manual are inconsistent in declarations of main() rafe.kettler at gmail dot com
2012-01-04 20:01 ` [Bug manual/13058] " aj at suse dot de
2012-02-18  0:13 ` jsm28 at gcc dot gnu.org
2014-06-27 12:44 ` fweimer at redhat dot com

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).