This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc 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]

open() and fopen()


As you know, there are 2 different open() calls:

a) open(char *path, int flags, mode_t mode)
b) open(char *path, int flags)

How does the compiler distinguish between two? I guess stdarg stuff 
cannot be used, as we should know beforehand the number and types of the 
arguments. they don't look like macros (and mentioned anywhere). 
Function overloading in C, I don't think so [:)]

Anybody knows what fopen() does call? is it open() in the C library or 
directly the system call SYS_open, using syscall().

Thanks in advance...

-- 
Muzaffer Ozakca
Researcher/Software Engineer  -  muzaffer.ozakca@bilten.metu.edu.tr
TUBITAK-Bilten-ODTU - Communication Systems and Comp. Networks Group
ODTU, Ankara, Turkey
http://www.bilten.metu.edu.tr/   tel: +90-312-210 1311


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