No, I'm not. The OS I'm making has pluggable syscall subsystems, one of which happens to be POSIX so GNU apps can be run, however the native syscall subsystem is completely different from POSIX.LoseThos wrote:I take it you're making a linux clone?
How to use newlib
Re: How to use newlib
Re: How to use newlib
Any decent programmer knows it's quicker and more pleasant writing from scratch and only bosses and programmers without skills spout-off "Not invented here."
I am so frustrated with the state of sound on PC's. All i need is a pair of buffered digital to analog converters. I made a A-to-D/D-to-A ISA card years ago. I'm not kidding when I say I could make a sound card faster then figure-out how to program existing ones without documentation.
I am so frustrated with the state of sound on PC's. All i need is a pair of buffered digital to analog converters. I made a A-to-D/D-to-A ISA card years ago. I'm not kidding when I say I could make a sound card faster then figure-out how to program existing ones without documentation.
Last edited by LoseThos on Mon Dec 08, 2008 8:11 am, edited 1 time in total.
Re: How to use newlib
Did you really just say that?LoseThos wrote:Any decent programmer knows it's quicker and more pleasant writing from scratch
Re: How to use newlib
It's an exaduration, but sometimes true. I find it more pleasant doing my own stuff and generally hate those who suggest every little widget should be off-the-shelf.
Re: How to use newlib
IMO, this only applies when components and existing code are poorly written and maintained.LoseThos wrote:Any decent programmer knows it's quicker and more pleasant writing from scratch
What about programmers who want to use well tried and tested code, or compatibility with existing solutions?LoseThos wrote:only bosses and programmers without skills spout-off "Not invented here."
Cheers,
Adam
Re: How to use newlib
You know what you want to do better than I do. If you know anything about old formats, they tend to be "crufty", like FAT32 with the 8.3 names. I would hate to see a new operating system begin with a executable format dating to 32-bit days instead of 64-bit. Look-up on wikipedia the formats of .WAV files to .SND. The .WAV files are a monstrocity. Imagine trying to use MS Word documents as source files. That would be cool, but you just know the format of .DOC files is crufty. I think it takes thousands of pages to describe. Formats which have been around for a while grow ugly over time.
-
- Member
- Posts: 566
- Joined: Tue Jun 20, 2006 9:17 am
Re: How to use newlib
hi ,
Although I do not agree much with you . There are lots of library and code available that its simply better to reuse them than reinvent the wheel . But it sometimes make me look like an idiot . when I proudly say that "I have implemented XYZ() ;", Someone else might say there is a method in some super namespace that does it . Yes C# has a good reputation of making me look like a moron
Regards
Shrek
Although I do not agree much with you . There are lots of library and code available that its simply better to reuse them than reinvent the wheel . But it sometimes make me look like an idiot . when I proudly say that "I have implemented XYZ() ;", Someone else might say there is a method in some super namespace that does it . Yes C# has a good reputation of making me look like a moron
Regards
Shrek
Re: How to use newlib
I believe you are using a pejorative term completely backwards. Not Invented Here is a term used to describe the very methodology you are espousing.LoseThos wrote:...only bosses and programmers without skills spout-off "Not invented here."
Re: How to use newlib
I found out that Newlib has provided syscalls in /libc/syscalls. But I don't understand. For example, 'write' function was implemented in syswrite.c, which then call _write or _write_r, and '_write' and '_write_r' is defined external. So what do I have to implement? write or _write or _write_r or all? And how to do that?
"Programmers are tools for converting caffeine into code."
Re: How to use newlib
RTFM. Also, look at the header file newlib/libc/include/reent.h:quanganht wrote:I found out that Newlib has provided syscalls in /libc/syscalls. But I don't understand. For example, 'write' function was implemented in syswrite.c, which then call _write or _write_r, and '_write' and '_write_r' is defined external. So what do I have to implement? write or _write or _write_r or all? And how to do that?
Code: Select all
/* This header file provides the reentrancy. */
/* The reentrant system calls here serve two purposes:
1) Provide reentrant versions of the system calls the ANSI C library
requires.
2) Provide these system calls in a namespace clean way.
It is intended that *all* system calls that the ANSI C library needs
be declared here. It documents them all in one place. All library access
to the system is via some form of these functions.
There are three ways a target may provide the needed syscalls.
1) Define the reentrant versions of the syscalls directly.
(eg: _open_r, _close_r, etc.). Please keep the namespace clean.
When you do this, set "syscall_dir" to "syscalls" and add
-DREENTRANT_SYSCALLS_PROVIDED to newlib_cflags in configure.host.
2) Define namespace clean versions of the system calls by prefixing
them with '_' (eg: _open, _close, etc.). Technically, there won't be
true reentrancy at the syscall level, but the library will be namespace
clean.
When you do this, set "syscall_dir" to "syscalls" in configure.host.
3) Define or otherwise provide the regular versions of the syscalls
(eg: open, close, etc.). The library won't be reentrant nor namespace
clean, but at least it will work.
When you do this, add -DMISSING_SYSCALL_NAMES to newlib_cflags in
configure.host.
Stubs of the reentrant versions of the syscalls exist in the libc/reent
source directory and are used if REENTRANT_SYSCALLS_PROVIDED isn't defined.
They use the native system calls: _open, _close, etc. if they're available
(MISSING_SYSCALL_NAMES is *not* defined), otherwise open, close, etc.
(MISSING_SYSCALL_NAMES *is* defined). */
/* WARNING: All identifiers here must begin with an underscore. This file is
included by stdio.h and others and we therefore must only use identifiers
in the namespace allotted to us. */
Re: How to use newlib
It's silly to argue over "Not invented here..." If I say "Do unto others...", you know the saying, right? My usage was completely clear since I clearly was arguing against those who mention "Not invented here syndrome".
"Pejoritive"? Aren't you a fancy pants.
Have to break-out some Godtalk on your butt. He uses high falootin words.
God says...
"Pejoritive"? Aren't you a fancy pants.
Have to break-out some Godtalk on your butt. He uses high falootin words.
God says...
I have a saying "Chess nuts boasting in an open foyer."The moderators want LoseThos to SHUT UP.