473,748 Members | 3,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

stdio.h ?

can "stdio.h" be OS specific at the kernal level or ? i know what I'm
trying to ask here but not sure how to word it :-)
--
Woodzy
http://www.rtdos.com/forum
Nov 14 '05
53 4544
"E. Robert Tisdale" <E.************ **@jpl.nasa.gov > writes:
(ProteanThread) wrote:
1. what's a tyger?
Tyger! Tyger! burning bright

What has caused you to ignite?
-- William Blake

-- Not William Blake

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #41
Tiger, Tiger extincting fast.

-- Imanpreet Singh Arora

--
Imanpreet Singh Arora

I often quote myself. It adds tyger to my
conversation.

Nov 14 '05 #42
"CBFalconer " <cb********@yah oo.com> wrote in message
news:42******** *******@yahoo.c om...

A lightly edited copy of the final draft, especially suitable for
searching with grep and text editors, and for newgroup quoting, is
at:

<http://cbfalconer.home .att.net/download/n869_txt.bz2>

Thank Chuck.
Nov 14 '05 #43
> > Makes sense (but microsoft usually never follows the rules anyways)

They are trying to do so more and more, but they
botched many things in the past and are stuck with
them.


Microsoft has both standard features and proprietary features, and the
documentation does not says what is standard and portable and what is
proprietary. For instance, fopen(name, "wb") is not documented as being
Windows-only.

This policy is surely to simplify porting the code to Windows, but not from
Windows :)

As about "MS not following the standards" if we are speaking about languages -
then they have some STL implementation different a bit from the SGI's STL.
People who were porting the heavy-use-STL code from Linux to Windows had
problems due to this. I think that probably MS uses the obsolete STL standard.

Anyway this is C++ and not C.

BTW - when MS had their Java toolkit, they strictly divided "Sun's
documentation" from "MS's documentation". If you used features from Sun's
documentation only - then the Java code was portable and multi-platform.

Nevertheless, among MS-only extensions to Java there were the analogs of
LoadLibrary/GetProcAddress (dlopen() and dlsym() in UNIXen), and MS recommended
them for use to call Windows-only native machine code from Java code. This is
what caused Sun to become outrageous and starting the lawsuit.

For now, they have C# and .NET with a similar feature called "pinvoke". I dunno
what is better - Java or .NET. From what I've heard on people working with
these tools, .NET designers were taught by Java's weak places, and thus C#/.NET
is better then Java - they have removed/reworked some things which were badly
designed in Java.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma***@storagecr aft.com
http://www.storagecraft.com
Nov 14 '05 #44
On 2005-03-09 17:28:37 -0500, Mark McIntyre <ma**********@s pamcop.net> said:
On Tue, 8 Mar 2005 22:03:11 -0500, in comp.lang.c , Clark S. Cox III
<cl*******@gmai l.com> wrote:
On 2005-03-08 19:11:10 -0500, Mark McIntyre <ma**********@s pamcop.net> said:
On Tue, 8 Mar 2005 16:48:32 -0700, in comp.lang.c , "\(ProteanThrea d\)"
<sy***@rtdos.co m> wrote:

Is there such information on creating or defining a "stdio.h" file or whats
been accept as the standard arguments therein?

The C standard defines what has to be in stdio.h.


Or, at least it defines what happens when the compiler encounters:
#include <stdio.h>


You might want to read chapter 7 and specifically 7.19
:-)


I have. What's your point?

Nothing in the standard says that stdio.h actually has to exist, or
that it actually has to be a file on disk, containing C code. You only
know that by typing:

#include <stdio.h>

in C source code, you will get declarations of several functions,
macros and types.
--
Clark S. Cox, III
cl*******@gmail .com

Nov 14 '05 #45
Maxim S. Shatskih wrote:
Makes sense (but microsoft usually never follows the rules anyways)


They are trying to do so more and more, but they
botched many things in the past and are stuck with
them.


Microsoft has both standard features and proprietary features, and the
documentation does not says what is standard and portable and what is
proprietary. For instance, fopen(name, "wb") is not documented as being
Windows-only.


I am glad to hear this -- because it would be wrong.
'w' and 'b' are both standard C, as is "wb".
Do you mean "wt" (instead of standard "w")?

Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Nov 14 '05 #46
On Fri, 11 Mar 2005 10:11:35 -0500, in comp.lang.c , Clark S. Cox III
<cl*******@gmai l.com> wrote:
On 2005-03-09 17:28:37 -0500, Mark McIntyre <ma**********@s pamcop.net> said:
On Tue, 8 Mar 2005 22:03:11 -0500, in comp.lang.c , Clark S. Cox III
<cl*******@gmai l.com> wrote:
Or, at least it defines what happens when the compiler encounters:
#include <stdio.h>
You might want to read chapter 7 and specifically 7.19
:-)


I have. What's your point?


it defines whats in stdio.h.
Nothing in the standard says that stdio.h actually has to exist, or
that it actually has to be a file on disk, containing C code.


I've never said that it did - in fact if you read my comments elsethread you'll
see I said the same thing. I don't see that as remotely relevant tho.

The standard lists what is defined in stdio.h. Whether its "in" as in "inside
some file" or "in" as in "in pixie dust and copied into your translation unit
during phase x of compilation" is highly immaterial.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >
Nov 14 '05 #47
Maxim S. Shatskih wrote:
Makes sense (but microsoft usually never follows the rules anyways)
They are trying to do so more and more, but they
botched many things in the past and are stuck with
them.


Microsoft has both standard features and proprietary features, and the
documentation does not says what is standard and portable and what is
proprietary. For instance, fopen(name, "wb") is not documented as being
Windows-only.


I think "wb" is standard, but I may be mistaken.
As about "MS not following the standards" if we are speaking about languages -
then they have some STL implementation different a bit from the SGI's STL.
People who were porting the heavy-use-STL code from Linux to Windows had
problems due to this. I think that probably MS uses the obsolete STL standard.


Prior to Visual C++ 7.0, the support for templates was very scarce and
the STL is all about templates, which made the standard library quite
non-compliant. From 7.1, it gets quite close to full compliance.
Jonathan
Nov 14 '05 #48
On 2005-03-11 10:48:08 -0500, Mark McIntyre <ma**********@s pamcop.net> said:
On Fri, 11 Mar 2005 10:11:35 -0500, in comp.lang.c , Clark S. Cox III
<cl*******@gmai l.com> wrote:
Nothing in the standard says that stdio.h actually has to exist, or
that it actually has to be a file on disk, containing C code.


I've never said that it did - in fact if you read my comments
elsethread you'll see I said the same thing. I don't see that as
remotely relevant tho.


Then I misinterpreted you, sorry.

--
Clark S. Cox, III
cl*******@gmail .com

Nov 14 '05 #49
> I am glad to hear this -- because it would be wrong.
'w' and 'b' are both standard C, as is "wb".


I saw Linux failing fopen() if "wb" is specified, so I considered this to be
Microsoftism.

It was old ago in 2000 though.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
ma***@storagecr aft.com
http://www.storagecraft.com
Nov 14 '05 #50

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2295
by: clusardi2k | last post by:
Hello, I'm trying to understand someone else code. The below compiles and works fine and dandy. #include <sys/types.h> #include "unistd.h" #include "stdio.h"
4
17110
by: Chad | last post by:
What purpose does __THROW serve in stdio.h. For example, in I see stuff like the following in stdio.h: /* Generate a temporary filename. */ extern char *tmpnam (char *__s) __THROW; __END_NAMESPACE_STD #ifdef __USE_MISC /* This is the reentrant variant of `tmpnam'. The only difference is that it does not allow S to be NULL. */
9
1732
by: sunway | last post by:
i have written a small program, it turns out to be wrong, while(read()!=EOF){ read(); read(); read(); } so,when read==EOF,the next read() will read a -1, and the program will go infinitely.
11
2775
by: talk | last post by:
hi,guy i have a question. are the functions in <stdio.h> system calls provided by operation system? if so, i want to know how C implements that we can call system calls by using the functions in <stdio.h>. i need your help, thanks a lot.
2
14574
by: david wolf | last post by:
My understanding is that cstdio basically is the same as stdio.h except the functions are in a namspace called std. However when I take a look at the content of the file cstdio, it has the following lines inside only: -------content of cstdio on red hat linux enterprise 3---- #ifndef __CSTDIO__ #define __CSTDIO__ #include <stdio.h> #endif
4
2984
by: SamG | last post by:
I have installed ubuntu 6.10 on my intel PC and when i try to write a small c code and compile it i get an error saying the is reference to stdio.h i checked /usr/include and /usr/local/include and i searched the whole system for stdio.h file but i was not able to find the file. My gcc is there but how come the stdio.h is not included. How to get around this problem, it seems non of the glibc include
17
8931
by: lak | last post by:
if i view stdio.h there are only symbolic constants. where is the definition of printf and scanf is available? i want to see the definition of printf and scanf and where it is stored?
1
1479
by: samoukos | last post by:
Hello i had to do this project but at school they tell me that it will be faster using stdio insteed of fstream... Is that right??? if it is faster can anyone suggest how this code will be using stdio???thank you???? here is the code: //Made by Samuel Johnson //email:sammojohn@gmail.com #include<iostream>
6
4875
by: hanaa | last post by:
Hello.. Is it okay to use functions such as setvbuf (that is defined in stdio.h) in a C++ program? I include stdio.h in the program and it works. Yet, I wonder if its okay.. stdio.h is a part of the standard C library and not standard C++ library, if I'm not wrong. I also want to know if many such other functions can be used in C++ programming. Is there a clear line between the standard libraries for C and C++? Is using either in the...
0
8989
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9537
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8241
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.