[2.2.0p1] patch: generic detection of correct getpgrp() invocation

Charles Levert charles at comm.polymtl.ca
Wed Sep 6 03:50:44 EST 2000


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 */
========================================================================





More information about the openssh-unix-dev mailing list