Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

documentation/3227: type of fopen()

From: Kamo Hiroyasu <wd(at)ics.nara-wu.ac.jp>
Date: Tue Apr 22 2003 - 03:43:14 EDT


>Number: 3227
>Category: documentation
>Synopsis: synopsis of fopen(3) is out of date
>Confidential: yes
Nara Women's University
>Environment:
        

	System      : OpenBSD 3.2
	Architecture: OpenBSD.sparc
	Machine     : sparc

>Description:

The type of fopen() described in the SYNOPSIS section of the manpage does not match to the current declaration / definition.

In the manpage fopen(3):

	     FILE *
	     fopen(char *path, char *mode);

In /usr/include/stdio.h :
	FILE    *fopen(const char *, const char *);

In /usr/src/lib/libc/stdio/fopen.c :
	FILE *
	fopen(file, mode)
		const char *file;
		const char *mode;
	{

	

>How-To-Repeat:
        

>Fix:
        

  • src/lib/libc/stdio/fopen.3 Sun Mar 9 04:04:05 2003 +++ src/lib/libc/stdio/fopen.3 Tue Apr 22 13:31:04 2003 @@ -46,11 +46,11 @@ .Sh SYNOPSIS .Fd #include <stdio.h> .Ft FILE * -.Fn fopen "char *path" "char *mode" +.Fn fopen "const char *path" "const char *mode" .Ft FILE * -.Fn fdopen "int fildes" "char *mode" +.Fn fdopen "int fildes" "const char *mode" .Ft FILE * -.Fn freopen "char *path" "char *mode" "FILE *stream" +.Fn freopen "const char *path" "const char *mode" "FILE *stream" .Sh DESCRIPTION The .Fn fopen

>Release-Note:
Received on Tue Apr 22 03:54:46 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:54 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library