Jump to content

Talk:C standard library

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

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

[edit]

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

"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)[reply]
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)[reply]

About subarticles (e.g. C mathematical functions)

[edit]

There are links to a site called cppreference.com (and almost all subarticles has those links) and it looks like WP:SOAP and I think (for example) the link to [2] should be replaced with [3] or [4]. What do you think? --betseg (talk) 21:13, 15 November 2015 (UTC)[reply]

I don't know the background but a quick look shows cppreference.com is pretty good. By the way, WP:SOAP is referring to advocacy (arguing, for example, in favor of a particular political outlook). I guess you are suggesting the website is being promoted (WP:PROMO). I don't know, but evidence for that would be if a small number of editors were focusing on adding that link. Issues such as whether a link is spam are normally discussed at WP:ELN whereas there might be more attention to which is the best C reference at WT:COMP, with a link to the discussion at Talk:C (programming language) and here. Johnuniq (talk) 22:11, 15 November 2015 (UTC)[reply]
cppreference.com is "at top" or "near top" of C function searches on google, just like Wikipedia, so they can't be all bad. I've used those links and their information is pretty good. I like how they state the section number for each C/C++ specification. • SbmeirowTalk01:58, 16 November 2015 (UTC)[reply]
Or maybe the site is at top because Wikipedia has a lot of links to the site? That's how Google works. --betseg (talk) 05:32, 19 November 2015 (UTC)[reply]
The engine automatically adds rel="nofollow" to every external link to prevent search engines from considering them in ranking - specifically to discourage this kind of "promotion". Though I agree that a site shall be judged solely by its content rather than position in a search result. — Vano 10:50, 20 November 2015 (UTC)[reply]
I think {{man}} would be the perfect thing to use.--betseg (talk) 12:08, 22 November 2015 (UTC)[reply]

Linking libm on linux

[edit]

None of the linux distributions, over the past 18 years, I have every used, have required me to link with libm. The claim that you *must* link with -lm seems dubious if not outright wrong. Can anyone confirm that this real today? — Preceding unsigned comment added by 188.176.25.249 (talk) 09:18, 12 February 2019 (UTC)[reply]

Reading the page, I believe it's only saying you need -lm if you actually use any math functions (sqrt, sin, etc.), which comports with my experience. SJFriedl (talk) 21:56, 6 June 2020 (UTC)[reply]

A Commons file used on this page or its Wikidata item has been nominated for speedy deletion

[edit]

The following Wikimedia Commons file used on this page or its Wikidata item has been nominated for speedy deletion:

You can see the reason for deletion at the file description page linked above. —Community Tech bot (talk) 19:09, 18 August 2022 (UTC)[reply]

India Education Program course assignment

[edit]

This article was the subject of an educational assignment supported by Wikipedia Ambassadors through the India Education Program.

The above message was substituted from {{IEP assignment}} by PrimeBOT (talk) on 19:55, 1 February 2023 (UTC)[reply]

Alternate names

[edit]

WRT "The C standard library or libc": I think the term libc is rather *nix specific and therefore should not be implied to be such a common alternate name. IMO libc should be introduced later in the context of *nix implementations.

WRT "the C standard library is also called the ISO C library": IDK. I've never hear of that and google trends says it's very obscure: no history in US since 2004! A search on "ISO C library" does of course find this WP page, but this is a case of WP making a term notable ... which it's not supposed to do. Stevebroshar (talk) 17:20, 20 October 2024 (UTC)[reply]

ANSI/ISO...

[edit]

WRT "The C standard library ... is the standard library for the C programming language, as specified in the ISO C standard" That's not wrong, but it's overly specific and confuses the topic and reader. The ANSI C standard also defines a c standard lib. I think the intro should start with simply "The C standard library is the standard library for the C programming language". Later say that there have been multiple versions over time; first from ANSI, then later from ISO. IMO standardization is subordinate to what the library _is_. Stevebroshar (talk) 17:43, 20 October 2024 (UTC)[reply]

The page discusses those library routines and macros that are specified by the ISO C standard. How that's done is platform-dependent. UN*Xes have traditionally provided a library, linked by default by the C compiler driver command (cc, gcc, clang, etc.), *usually* called "libc", as in "a file containing those routines has a name consisting of 'libc' followed by the appropriate extension, such as '.a' for a static library and '.so' (SunOS 4 and all systems using ELF), '.dylib' (macOS and other Apple OSes using Mach-O), '.sl' (32-bit HP-UX), or even '.a' (AIX) for a dynamically-linked shared library". However, it's called "libSystem" on Apple's OS.
On UN*Xes, that library also contains UN*X-specific APIs, such as open(), read(), write(), lseek(), close(), getpwuid(), etc.; perhaps that's why macOS (and NeXTSTEP?) renamed it "libSystem". On some UN*Xes, some UN*X APIs, e.g. socket APIs, may be in yet another library, not linked by default. I remember, at one point during the AT&T/Sun discussions about SVR4, AT&T made a proposal to break up libc into multiple libraries, including separating C language support routines and UN*X APIs, but that didn't happen.
On other platforms, there may be separate libraries for native OS APIs and standard C routines, although the "standard C routines" library may have additional routines, as is the case on Windows with Visual Studio.
So, yeah, at most it should speak of "libc" as being an idiom used on UN*Xes, rather than an alternate name.
As for the ISO standard, ISO/IEC 9899:2018 appears to refer to the "standard library" in some places, but that's about it. Guy Harris (talk) 18:04, 20 October 2024 (UTC)[reply]

What is __STDC_HOSTED__?

[edit]

WRT "According to the C standard the macro __STDC_HOSTED__ shall be defined to 1 if the implementation is hosted. A hosted implementation has all the headers specified by the C standard. An implementation can also be freestanding which means that these headers will not be present. If an implementation is freestanding, it shall define __STDC_HOSTED__ to 0."

What is that saying? If the value is 1, then the implementation (preprocessor? compiler? linker? toolset? app?) is hosted and that it (what ever it is) has all the c standard headers. If the value is 0, then it's freestanding which means it doesn't have all the headers. Freestanding means it has less than the full set? Really? That's confusing naming.

Whatever this macro actually does... I don't think it belongs in this article. Seems too technical for this context. Stevebroshar (talk) 17:51, 20 October 2024 (UTC)[reply]