Charles Levert
2000-Sep-05 16:50 UTC
[2.2.0p1] patch: generic detection of correct getpgrp() invocation
Hi. Several OSes have a getpgrp() function that takes an argument, unlike what POSIX mandates. NeXT was covered, but SunOS wasn't. This provides a generic solution through autoconf. Charles =======================================================================--- configure.in.orig-2.2.0p1 Wed Aug 30 18:20:05 2000 +++ configure.in Tue Sep 5 10:48:20 2000 @@ -284,6 +284,8 @@ ) fi +AC_FUNC_GETPGRP + PAM_MSG="no" AC_ARG_WITH(pam, [ --without-pam Disable PAM support ], --- config.h.in.orig-2.2.0p1 Fri Sep 1 19:08:44 2000 +++ config.h.in Tue Sep 5 11:01:57 2000 @@ -46,6 +46,9 @@ /* Define if your snprintf is busted */ #undef BROKEN_SNPRINTF +/* Define if getpgrp takes no argument */ +#undef GETPGRP_VOID + /* Define if you are on NeXT */ #undef HAVE_NEXT --- defines.h.orig-2.2.0p1 Mon Aug 28 20:33:51 2000 +++ defines.h Tue Sep 5 11:31:36 2000 @@ -322,6 +322,10 @@ # define atexit(a) on_exit(a) #endif /* !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT) */ +#ifndef GETPGRP_VOID +# define getpgrp() getpgrp(0) +#endif + /** ** login recorder definitions **/ --- next-posix.h.orig-2.2.0p1 Tue Aug 29 19:11:30 2000 +++ next-posix.h Tue Sep 5 11:11:08 2000 @@ -44,7 +44,6 @@ /* MISC functions */ int waitpid(int pid,int *stat_loc,int options); -#define getpgrp() getpgrp(0) pid_t setsid(void); /* TC */ ========================================================================
Ben Lindstrom
2000-Sep-05 17:49 UTC
[2.2.0p1] patch: generic detection of correct getpgrp() invocation
Is there anything else from next-posix.[ch] that the SunOS folks need? I've pretty much decided that except for maybe waitpid() that the rest of it will pretty much stay in next-posix.[ch] until another platform needs it. (Like Sony NEWS.. I assume that it's still not working right. Wish I could help, but without a NEWS machine infront of me I'm not sure what else to look at) Ben On Tue, 5 Sep 2000, Charles Levert wrote:> Hi. > > Several OSes have a getpgrp() function that takes an argument, unlike > what POSIX mandates. NeXT was covered, but SunOS wasn't. This > provides a generic solution through autoconf. > > > Charles > > > =======================================================================> --- configure.in.orig-2.2.0p1 Wed Aug 30 18:20:05 2000 > +++ configure.in Tue Sep 5 10:48:20 2000 > @@ -284,6 +284,8 @@ > ) > fi > > +AC_FUNC_GETPGRP > + > PAM_MSG="no" > AC_ARG_WITH(pam, > [ --without-pam Disable PAM support ], > --- config.h.in.orig-2.2.0p1 Fri Sep 1 19:08:44 2000 > +++ config.h.in Tue Sep 5 11:01:57 2000 > @@ -46,6 +46,9 @@ > /* Define if your snprintf is busted */ > #undef BROKEN_SNPRINTF > > +/* Define if getpgrp takes no argument */ > +#undef GETPGRP_VOID > + > /* Define if you are on NeXT */ > #undef HAVE_NEXT > > --- defines.h.orig-2.2.0p1 Mon Aug 28 20:33:51 2000 > +++ defines.h Tue Sep 5 11:31:36 2000 > @@ -322,6 +322,10 @@ > # define atexit(a) on_exit(a) > #endif /* !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT) */ > > +#ifndef GETPGRP_VOID > +# define getpgrp() getpgrp(0) > +#endif > + > /** > ** login recorder definitions > **/ > --- next-posix.h.orig-2.2.0p1 Tue Aug 29 19:11:30 2000 > +++ next-posix.h Tue Sep 5 11:11:08 2000 > @@ -44,7 +44,6 @@ > > /* MISC functions */ > int waitpid(int pid,int *stat_loc,int options); > -#define getpgrp() getpgrp(0) > pid_t setsid(void); > > /* TC */ > =======================================================================>
Charles Levert
2000-Sep-06 01:54 UTC
[2.2.0p1] patch: generic detection of correct getpgrp() invocation
> Is there anything else from next-posix.[ch] that the SunOS folks need? > I've pretty much decided that except for maybe waitpid() that the rest > of it will pretty much stay in next-posix.[ch] until another platform > needs it. (Like Sony NEWS.. I assume that it's still not working > right. Wish I could help, but without a NEWS machine infront of me > I'm not sure what else to look at)In the spare minutes I use to play with free software, I'll try to look at each of the items in next-posix.[ch] to see if they can be applied to SunOS or better yet, generalized through autoconf. So don't worry if I don't deliver right away or all at once... Charles
Damien Miller
2000-Sep-16 02:49 UTC
[2.2.0p1] patch: generic detection of correct getpgrp() invocation
On Tue, 5 Sep 2000, Charles Levert wrote:> Hi. > > Several OSes have a getpgrp() function that takes an argument, unlike > what POSIX mandates. NeXT was covered, but SunOS wasn't. This > provides a generic solution through autoconf.Thanks - applied. -d -- | ``The power of accurate observation is | Damien Miller <djm at mindrot.org> | commonly called cynicism by those who | @Work <djm at ibs.com.au> | have not got it'' - George Bernard Shaw | http://www.mindrot.org