delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2005/01/07/13:32:54

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
From: <ams AT ludd DOT ltu DOT se>
Message-Id: <200501071824.j07IOHnd003937@speedy.ludd.ltu.se>
Subject: fgetgrent pollution (was: More complaints from tests/libclink/check)
In-Reply-To: <200412311242.iBVCgqLY006397@speedy.ludd.ltu.se>
"from ams AT ludd DOT ltu DOT se at Dec 31, 2004 01:42:52 pm"
To: djgpp-workers AT delorie DOT com
Date: Fri, 7 Jan 2005 19:24:17 +0100 (CET)
X-Mailer: ELM [version 2.4ME+ PL78 (25)]
MIME-Version: 1.0
X-ltu-MailScanner-Information: Please contact the ISP for more information
X-ltu-MailScanner: Found to be clean
X-MailScanner-From: ams AT ludd DOT ltu DOT se
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

According to ams AT ludd DOT ltu DOT se:
> getgrent.o: (P),(O)
> getgrent.o: (P) != stub (endgrent)
>   T endgrent
>   T fgetgrent
>   T getgrent
>   T setgrent
>   U getgid
>   U getgrgid
> 
> I suspect it is complaining about fgetgrent. Is that POSIX?

What I can find, fgetgrent() is not POSIX. Patch follows. Or I could
just stub it. Opinions?

Another wierdness is that the functions endgrent(), getgrent(),
fgetgrent() and setgrent() all are are coded in src/libc/posix/grp/
(which implies POSIX) and the documentation I've found on the web says
they are except fgetgrent(). But <grp.h> and the documentation says
they are _not_ POSIX. Hohummmm...


Right,

						MartinS

Index: djgpp/src/libc/posix/grp/fgetgren.c
===================================================================
RCS file: djgpp/src/libc/posix/grp/fgetgren.c
diff -N djgpp/src/libc/posix/grp/fgetgren.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ djgpp/src/libc/posix/grp/fgetgren.c	7 Jan 2005 18:15:56 -0000
@@ -0,0 +1,12 @@
+/* Copyright (C) 2005 DJ Delorie, see COPYING.DJ for details */
+/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
+#include <grp.h>
+#include <unistd.h>
+
+/* ARGSUSED */
+struct group *
+fgetgrent(void *f)
+{
+  return getgrent();
+}
+
Index: djgpp/src/libc/posix/grp/fgetgren.txh
===================================================================
RCS file: djgpp/src/libc/posix/grp/fgetgren.txh
diff -N djgpp/src/libc/posix/grp/fgetgren.txh
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ djgpp/src/libc/posix/grp/fgetgren.txh	7 Jan 2005 18:15:56 -0000
@@ -0,0 +1,20 @@
+@c ----------------------------------------------------------------------
+@node fgetgrent, unix
+@findex fgetgrent
+@subheading Syntax
+
+@example
+#include <grp.h>
+
+struct group *fgetgrent(FILE *file);
+@end example
+
+@subheading Description
+
+This function, in MS-DOS, is exactly the same as @code{getgrent}
+(@pxref{getgrent}). 
+
+@subheading Portability
+
+@portability !ansi, !posix
+
Index: djgpp/src/libc/posix/grp/getgrent.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/posix/grp/getgrent.c,v
retrieving revision 1.1
diff -p -u -r1.1 getgrent.c
--- djgpp/src/libc/posix/grp/getgrent.c	1 Apr 1995 22:29:40 -0000	1.1
+++ djgpp/src/libc/posix/grp/getgrent.c	7 Jan 2005 18:15:56 -0000
@@ -15,13 +15,6 @@ getgrent(void)
   return 0;
 }
 
-/* ARGSUSED */
-struct group *
-fgetgrent(void *f)
-{
-  return getgrent();
-}
-
 void
 setgrent(void)
 {
Index: djgpp/src/libc/posix/grp/getgrent.txh
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/posix/grp/getgrent.txh,v
retrieving revision 1.7
diff -p -u -r1.7 getgrent.txh
--- djgpp/src/libc/posix/grp/getgrent.txh	5 Mar 2003 19:42:32 -0000	1.7
+++ djgpp/src/libc/posix/grp/getgrent.txh	7 Jan 2005 18:15:56 -0000
@@ -53,26 +53,6 @@ endgrent();
 @end example
 
 @c ----------------------------------------------------------------------
-@node fgetgrent, unix
-@findex fgetgrent
-@subheading Syntax
-
-@example
-#include <grp.h>
-
-struct group *fgetgrent(FILE *file);
-@end example
-
-@subheading Description
-
-This function, in MS-DOS, is exactly the same as @code{getgrent}
-(@pxref{getgrent}). 
-
-@subheading Portability
-
-@portability !ansi, !posix
-
-@c ----------------------------------------------------------------------
 @node setgrent, unix
 @findex setgrent
 @subheading Syntax

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019