[OT?] write C program with UTF16LE

Chuck Swiger cswiger at mac.com
Mon Mar 15 16:48:40 PST 2004


Adam Bozanich wrote:
> On Mon, 15 Mar 2004, Matthew Seaman wrote:
>>Errr... no.  Not even if you're using the Linux devtools to create a
>>Linux executable.  You're using the FreeBSD system libc.  Same API,
>>different code, different licencing terms.
>
> Yep, one look at /usr/include/stdio.h proves you right.  Thanks... I (obviously)
> didn't realize that.
> 
> Now I'm very curious.  If BSD has it's own C api, did it at one time have
> it's own compiler?  If so, what happened to it?

Well, one can track down the original C compiler written by Kernighan & 
Ritchie.  Somewhere around 1981, one can also find references to PCC, the 
"Portable C Compiler" by Aho & Johnson, which has largely been replaced by 
GNU's gcc since then.  There's been some effort recently to make FreeBSD go 
using Intel's icc, as well.

> Does gcc have to know about the different syscall calling conventions?

GCC has to know about the local architecture's calling conventions.  GCC does 
not need to know anything special about the system call interface defined by 
the kernel and libc.

-- 
-Chuck


More information about the freebsd-questions mailing list