Talk:C standard library

From Wikipedia, the free encyclopedia
Jump to: navigation, search
          This article is of interest to the following WikiProjects:
WikiProject Computing (Rated Start-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.
 
WikiProject C/C++ (Rated Start-class, Top-importance)
WikiProject icon This article is within the scope of WikiProject C/C++, a collaborative effort to improve the coverage of C/C++ on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the quality scale.
 Top  This article has been rated as Top-importance on the importance scale.
Taskforce icon
This article falls within the scope of C.
 

Move?[edit]

The following discussion is an archived discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. No further edits should be made to this section.

The result of the move request was: no consensus for move. Favonian (talk) 19:55, 9 December 2011 (UTC)


C standard libraryC Standard Library

  • Support as nominator. 1exec1 (talk) 16:33, 2 December 2011 (UTC)
  • Oppose. I'm not convinced there's a conventional capitalization for this phrase; a lot of the time when each word is capitalized in any sources, it's probably because it's a heading and that particular author has a convention of capitalizing all words in a heading. For example, in K&R, 2nd edition, it's "Appendix B. Standard Library" in the Table of Contents but all lower case in the text, e.g., on p. 3, "The standard library functions are only called explicitly, so they can be avoided if not needed." Our convention on Wikipedia is that we only capitalize the first word in most cases and I think that's what we should continue to do here. Msnicki (talk) 23:47, 2 December 2011 (UTC)
  • Oppose WP:COMMONNAME says in the intro proper nouns, please read WP:CAPS too. The ISO/IEC 9899:1999 specification[1] does not use capitalization (one place it does in a footnote) and it is the reference in this article for the title. Christian75 (talk) 00:09, 3 December 2011 (UTC)
Isn't C Standard Library a proper noun with specific designators? The reference you mentioned doesn't contain phrase C standard library at all as far as I can tell. 1exec1 (talk) 01:45, 3 December 2011 (UTC)
It's not capitalized in that spec. From page 167, "The functions in the standard library are not guaranteed to be reentrant and may modify objects with static storage duration." and "Thus, a signal handler cannot, in general, call standard library functions." See also pages 247 and 499. Msnicki (talk) 02:52, 3 December 2011 (UTC)
Yes, standard library is not capitalized. I'm not sure whether standard library and C standard library is the same thing though. The proper nouns article has several examples where such distinction is emphasized, e.g. The university has a school of medicine., The University of Hawaii at Manoa has a school of medicine, <...>. So, it this case standard library means any standard library, C Standard Library means the particular library (as a standard) of the C programming language. That's how I interpret the proper nouns article. Though I think we need an expert opinion here. 1exec1 (talk) 12:20, 3 December 2011 (UTC)
They didn't say "a standard library", they said "the standard library". And it starts off on page 1 stating, "This International Standard specifies the form and establishes the interpretation of programs written in the C programming language.", so we know they weren't thinking about a library for FORTRAN. You're grasping at straws. Msnicki (talk) 16:01, 3 December 2011 (UTC)
Please read proper nouns. The following examples The university has a school of medicine., The University of Hawaii at Manoa has a school of medicine, <...> both refer to the same instance of an university. Similarly, the cited reference has no need to capitalize the standard library, thus such usage is irrelevant when deciding whether C standard library is a proper noun or not. 1exec1 (talk) 17:13, 3 December 2011 (UTC)
What part of "They didn't say "a standard library", they said "the standard library"." seems confusing? Msnicki (talk) 17:21, 3 December 2011 (UTC)
  • Question. Is C standard library proper noun or not? 1exec1 (talk) 17:15, 3 December 2011 (UTC)
  • Weak oppose. Third party sources are more important than the standards themselves. Anyway, I don’t think there are any clear conventional names for the library. It looks like some sources write C Standard Library in capitals, others write it in lower case, and others don’t go out of their way to use either form. My gut feeling is standard C library (rearranged wording) is more common anyway, and Google tends to support this. One reference book I flicked through just uses descriptive terms such as the standard C I/O functions, C/C++ function library, C/C++ standard library, and standard function library. Vadmium (talk, contribs) 13:10, 4 December 2011 (UTC).
  • Undecided This needs a more thorough analysis of the available literature to see whether this is significantly more commonly used as a proper noun, or as Vadmium suggest in the alternative form "standard C library". I can't possibly decide without statistics. A simple Google search won't suffice due to for example the issue with capitalization of headers that Msnicki describes. —Ruud 22:10, 4 December 2011 (UTC)
  • Oppose until knockout reasons are available Whatever the merits, such a move would just invite venting from the MOS titles crowd. Why bother? There should be excellent sources supporting a move, before it happens. Johnuniq (talk) 02:35, 5 December 2011 (UTC)
  • Oppose - I don't have an answer but, 1exec1's proper noun question is what the decision to rename should be based off. For the purposes of capitalization on WP, it is of little importance how the term is capitalized in sources - those sources are probably using a different style guide. I've read Proper noun and am quite familiar with the C standard library but am still reluctant to make a call on this. I have observed, however, that there is a tenancy for these disputes to resolve to lower case when the topic is not clearly a proper noun. See Talk:Physical_Layer#Requested_move.2C_multiple for instance. --Kvng (talk) 14:49, 6 December 2011 (UTC)
  • Uniformity I vote for uniformity. I don't care what you name all the article, but I do care about them ALL having a similar naming format, including this article name. Redirects will solve all other issues. Come up with some naming formats, vote on it, and move on down the road. • SbmeirowTalk • 16:00, 6 December 2011 (UTC)
The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page. No further edits should be made to this section.

Error handling[edit]

A bit about error handling was removed saying it was glibc specific. It does mention glibc but the problem is general with the C standard library. It seems very odd to me that there is not more about the problems of error handling. The problems of thread safe handling should also be dealt with in this context, particularly in how it affects the handling of errno. Dmcq (talk) 11:39, 4 February 2012 (UTC)

Licence?[edit]

Unlike its sibling articles GNU C Library and uClibc, this article does not mention any licence? Why is that? Swenkman (talk) 21:27, 9 August 2012 (UTC)

It's an interface rather than a specific implementation. Interfaces aren't covered by copyright. — Vano 23:47, 17 August 2013 (UTC)

Organizing the buffer overflow vulnerabilities[edit]

I noticed that this section does not mention secured alternatives to vulnerable functions in the C std lib. Since this list is relatively long and fairly well documented, I think it would be useful to create a table in this section with the families of vulnerable functions, a summary of their specific vulnerabilities, and preferred functions. A starter list:

  • strcpy vs. strncpy (vs. strlcpy)
  • strcat vs. strncat (vs. strlcat)
  • sprintf vs. snprintf, vsprintf vs. vsnprintf
  • gets and scanf vs. fgets
  • strtok vs. strtok_r could also be discussed in the next subsection, on thread unsafe functions, for example

ozhu (talk·contribs) 02:22, 11 March 2014 (UTC)

That would be good additions to the C standard library § Buffer overflow vulnerabilities and C standard library § Threading problems, vulnerability to race conditions sections, and you're more than welcome to edit the article. Of course, as we know it should be backed with a few references. — Dsimic (talk | contribs) 16:45, 13 March 2014 (UTC)

Remove drive-by tagging by three-edit one-day anon IP[edit]

[2]MaxEnt 23:46, 20 March 2014 (UTC)

"Three-edit one-day anon" isn't a valid reason (this could be anyone who edited from an uncommon location). But the fact that there's nothing clearly "misleading" and no clarification is. — Vano 00:53, 21 March 2014 (UTC)
Yeah, IP addresses are human too, but the hatnote wasn't appropriate; I'd like to know what looked so misleading? — Dsimic (talk | contribs) 19:00, 22 March 2014 (UTC)