This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

General practices


Need some help:
I've gone through several of libgloss crt0 files, normally create code on the mac, love the editor!
Seen that Newlib has switched to 'FreeBSD' style FILE unit.
With the basic intro out of the way... the question is: from _start to main(), the normal 'return' from main() dumps you back to _start from which I assume Newlib has a standard expected termination of the process. Correct assumption? And is this expectation that of calling the 'exit' function? The reason for this question is that the APPLE FreeBSD style does call 'exit' which allows for clean up, such as flushing files, calling atexit(), etc. and lunix does not allow for such a clean up using
'return' from main(). Maybe I just misunderstand the 'C' process?
Thanks in advance, and hopefully down the road I can offer up a smaller, embedded type FILE unit, if I can work out the return vs. exit clean up. Not sure people want to stop using return for exit just
to flush stdout.
Steve



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]