2 ms·
Section 2 is for system calls. In other words libc functions which are just thin wrappers around the system call interface provided by the kernel. Section 3 i
by tgflynn 16y ago
Section 2 is for system calls. In other words libc functions which are just thin wrappers around the system call interface provided by the kernel.
Section 3 is for library API's. It typically includes the C standard library functions in addition to pages for other libraries which are installed on the system.
If you look at your examples you will find that fputs and fseek are declared in stdio.h, which is a C standard library header whereas lseek is declared in unistd.h which is a Unix/POSIX header.
lseek is a low level call to the kernel's filesystem interface. You can't access a file more directly unless you write a kernel module or modify the kernel. fseek and fputs wrap the low-level filesystem interface in a stream abstraction.
Also fseek and fputs should be available on any platform with a C compiler (including Windows) whereas lseek is only normally available on Unix/POSIX platforms.