This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
open() and fopen()
- From: Muzaffer Ozakca <muzaffer dot ozakca at bilten dot metu dot edu dot tr>
- To: glibc list <glibc-linux at ricardo dot ecn dot wfu dot edu>
- Date: Fri, 23 Nov 2001 07:18:56 +0000
- Subject: open() and fopen()
- Organization: Tubitak - Bilten
- Reply-to: glibc-linux at ricardo dot ecn dot wfu dot edu
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