>From [EMAIL PROTECTED] Thu Jun 21 01:29:53 2001


>> >>From [EMAIL PROTECTED] Thu Jun 21 00:44:08 2001
>>
>> >What I meant was: you don't have your own stdio.h. You're using the
>> >one from the system (printf.c does #include <stdio.h> and there is no
>> >stdio.h in the cdrtools package).
>>
>> >I think it would make more sense for you to write your own
>> >(minimalist) stdio.h file. It would match your own stdio perfectly,
>> >and you wouldn't have the gcc 3.0 problems at all.
>>
>> It would be very hard to make such an approach portable.

>If you'd build your own stdio on top of the low-level I/O functions
>(open/read/write etc.), it could be quite portable, and you wouldn't
>need _any_ stuff from the system's stdio implementation.

If you write functions that are named like the original ones, you may
get into problems with two points:

1)      other functions from libc may use implementation specific
        details and force to have both implementations probably
        working against each other or detroying data structures.

2)      If you use stdin/stdout/stderr there is a high chance to 
        force to hit point 1)


>> If you decide to have your own stdio.h, it should be POSIX compliant.
>> Unfortunately, stdio.h relies on many implementation specific stuff like
>> the local stdio package as well as on POSIX oddities. Believe me, it's
>> close to imposible to do this with stdio.h in a portable way.

>Why would it have to be POSIX compliant? It's an interface between
>cdrecord and those libschily I/O functions. Since the two are
>distributed together, there would never be a problem with
>standards-compliance.

If you name it differently, you may include the system's stdio too, but
then you may not call any of your functions the same as they are called in
stdio.h

look at http://www.opengroup.org/onlinepubs/7908799/xsh/stdio.h.html

and see that there may be many problems.



J�rg

 EMail:[EMAIL PROTECTED] (home) J�rg Schilling D-13353 Berlin
       [EMAIL PROTECTED]               (uni)  If you don't have iso-8859-1
       [EMAIL PROTECTED]           (work) chars I am J"org Schilling
 URL:  http://www.fokus.gmd.de/usr/schilling   ftp://ftp.fokus.gmd.de/pub/unix


--  
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to