Article View: net.bugs.v7
Article #163<pwd.h> and <grp.h> should declare various functions
From: Guy Harris
Date: Sun, 21 Jul 1985 00:19
Date: Sun, 21 Jul 1985 00:19
17 lines
1633 bytes
1633 bytes
The 4.2BSD version of <pwd.h> declares the functions "getpwent", "getpwuid", and "getpwnam", and the 4.2BSD version of <grp.h> declares the functions "getgrent", "getgrgid", and "getgrnam". I don't have V7 source to check whether its versions of these files declared those functions, but the System V versions of those files definitely don't. Most other include files of that sort (like <stdio.h>) declare the functions exported by the facility that the include file belongs to; those include files should do so also. (Not only will it permit code written for 4.2BSD that assumed the include files declared the functions to compile without warnings and work on machines where you have to declare functions which return pointers to get them to work, but it'll probably fix a lot of other programs out there written for other UNIX versions by programmers who just didn't give a damn. In addition, when ANSI Standard C becomes available, all such declarations can be updated to declare the types of the formal arguments to the routines as well as the types of their results.) Guy Harris
Technical Details
Message-ID:
<2455@sun.uucp>Path:
arc1-ca.pugleaf.net!utzoo!linus!decvax!decwrl!sun!guyShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!decwrl!sun!guy From: guy@sun.uucp (Guy Harris) Newsgroups: net.bugs.v7,net.bugs.usg Subject: <pwd.h> and <grp.h> should declare various functions Message-ID: <2455@sun.uucp> Date: Sat, 20-Jul-85 20:19:08 EDT Article-I.D.: sun.2455 Posted: Sat Jul 20 20:19:08 1985 Date-Received: Sun, 21-Jul-85 23:11:32 EDT Distribution: net Organization: Sun Microsystems, Inc. Lines: 17