🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #4551

Re: s-solaris2-1.h config file for Solaris?

#4551
From: Paul Pomes - UofIllinois CCSO
Date: Thu, 22 Jul 1993 03:12
479 lines
13085 bytes
tar@matt.ksu.ksu.edu (Tim Ramsey) writes:

>Has anyone ported nn 6.4 to Solaris 2?  If so, please contact me -- I'd
>like the diffs.

A fairly easy job.

#!/bin/sh
# This is a shell archive (produced by shar 3.49)
# To extract the files from this archive, save it to a file, remove
# everything above the "!/bin/sh" line above, and type "sh file_name".
#
# made 07/22/1993 03:12 UTC by paul@uxc.cso.uiuc.edu
# Source directory /var/tmp
#
# existing files will NOT be overwritten unless -c is specified
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#   2660 -rw-r--r-- s-solaris2.h
#   7307 -rw-r--r-- nn.pat
#
# ============= s-solaris2.h ==============
if test -f 's-solaris2.h' -a X"$1" != X"-c"; then
	echo 'x - skipping s-solaris2.h (File already exists)'
else
echo 'x - extracting s-solaris2.h (Text)'
sed 's/^X//' << 'SHAR_EOF' > 's-solaris2.h' &&
/*
X *	This is a generic System V Release 2 & 3 file.
X *
X *	If you need to modify anything, make a new s- file,
X *	#include this file, and #define or #undef a few symbols.
X */
X
X
/*
X *	Include header files containing the following definitions:
X *
X * 		off_t, time_t, struct stat
X */
X
#ifdef lint
struct proc {	/* sys/types.h references this on many systems */
X    int keep_lint_happy;
};
#endif
X
#include <sys/types.h>
#include <sys/stat.h>
X
/*
X *	Define if your system has system V like ioctls
X */
X
#define	HAVE_TERMIO			/* */
X
/*
X *	Define to use terminfo database.
X *	Otherwise, termcap is used
X */
X
#define	USE_TERMINFO			/* */
X
/*
X *	Specify the library containing the termcap/terminfo access routines.
X *	Notice:  nn does not use curses.
X *	Notice:  You must also specify whether termcap or terminfo is
X *		 used when you edit config.h (see below).
X */
X
#define	TERMLIB -lcurses
X
/*
X *	Define HAVE_STRCHR if strchr() and strrchr() are available
X */
X
#define HAVE_STRCHR			/* */
X
/*
X *	Define if a signal handler has type void (see signal.h)
X */
X
#define	SIGNAL_HANDLERS_ARE_VOID	/* */
X
/*
X *	Define if signals must be set again after they are caught
X */
X
#define	RESET_SIGNAL_WHEN_CAUGHT	/* */
X
/*
X *	Define if your system has BSD like job control (SIGTSTP works)
X */
X
#define HAVE_JOBCONTROL			/* */
X
/*
X *	Define if your system provides the "directory(3X)" access routines
X *
X *	If true, include the header file(s) required by the package below
X *	(remember that <sys/types.h> or equivalent is included above)
X *	Also typedef Direntry to the proper struct type.
X */
X
#ifdef NO_DIRENT_H
#undef NO_DIRENT_H
#else
X
#define	HAVE_DIRECTORY			/* */
X
#include <dirent.h>			/* System V */
typedef struct dirent Direntry;		/* System V */
X
#endif
X
/*
X *	Define if your system has a mkdir() library routine
X */
X
#define	HAVE_MKDIR			/* */
X
/*
X *	Define HAVE_GETHOSTNAME if your system provides a BSD like
X *	gethostname routine.
X *	Otherwise, define HAVE_UNAME if uname() is avaiable.
X *	As a final resort, define HOSTNAME to the name of your system.
X */
X
#define	HAVE_UNAME			/* System V */
X
/*
X *	Define DETATCH_TERMINAL to be a command sequence which
X *	will detatch a process from the control terminal
X *	Also include files needed to perform this HERE.
X *	If not possible, just define it (empty)
X */
X
#define	DETATCH_TERMINAL setpgrp();	/* System V */
X
/*
X *	Specify where the Bourne Shell is.
X */
X
#define SHELL		"/bin/sh"
X
/*
X *	Specify the default mailer to be invoked by nnmail
X */
X
#define	MAILX		"/usr/bin/mailx"	/* SV */
X
/*
X *	Define the maximum length of any pathname that may occur
X */
X
#define	FILENAME 	256
#define EXTRA_LIB	-lsocket -lnsl -lresolv
SHAR_EOF
chmod 0644 s-solaris2.h ||
echo 'restore of s-solaris2.h failed'
Wc_c="`wc -c < 's-solaris2.h'`"
test 2660 -eq "$Wc_c" ||
	echo 's-solaris2.h: original size 2660, current size' "$Wc_c"
fi
# ============= nn.pat ==============
if test -f 'nn.pat' -a X"$1" != X"-c"; then
	echo 'x - skipping nn.pat (File already exists)'
else
echo 'x - extracting nn.pat (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'nn.pat' &&
diff -r -c -b nn/Makefile nn-6.4.18/Makefile
*** nn/Makefile	Wed Jul 21 21:53:08 1993
--- nn-6.4.18/Makefile	Wed Jul 21 21:33:02 1993
***************
*** 7,17 ****
X  # Common values for CFLAGS are '-O -s' or '-g'
X  #
X  
! CC =		gcc
X  #CPP =		$(CC) -E
X  #CPP =		/usr/bin/cpp
! CPP =		/lib/cpp
! CFLAGS =	-O2 -pipe
X  LDFLAGS =
X  MAKE =		make
X  
--- 7,18 ----
X  # Common values for CFLAGS are '-O -s' or '-g'
X  #
X  
! CC =		cc
X  #CPP =		$(CC) -E
X  #CPP =		/usr/bin/cpp
! #CPP =		/lib/cpp
! CPP = /usr/local/libdata/gcc-lib/sparc-sun-solaris2/2.4.5/cpp
! CFLAGS =	-O
X  LDFLAGS =
X  MAKE =		make
X  
diff -r -c -b nn/config.h nn-6.4.18/config.h
*** nn/config.h	Wed Jul 21 22:04:43 1993
--- nn-6.4.18/config.h	Wed Jul 21 21:41:08 1993
***************
*** 64,70 ****
X   *	NOTE: If you plan to use the included inews, it MUST be a full pathname
X   */
X  
! #define NNTP_SERVER	"/usr/local/libdata/nn/nntp_server" /* */
X  
X  /*
X   *	Define NNTP_POST if you want nn to reject attempts to post via
--- 64,70 ----
X   *	NOTE: If you plan to use the included inews, it MUST be a full pathname
X   */
X  
! /* #define NNTP_SERVER	"/usr/local/etc/nntp_server"	/* */
X  
X  /*
X   *	Define NNTP_POST if you want nn to reject attempts to post via
***************
*** 106,112 ****
X   *	conf/s-template.h as a starting point for writing you own.
X   */
X  
! #include "s-bsd4-4.h"
X  
X  /*
X   *	Define DEFAULT_PAGER as the initial value of the 'pager' variable.
--- 106,112 ----
X   *	conf/s-template.h as a starting point for writing you own.
X   */
X  
! #include "s-solaris2.h"
X  
X  /*
X   *	Define DEFAULT_PAGER as the initial value of the 'pager' variable.
***************
*** 140,146 ****
X   *	conf/m-template.h as a starting point for writing you own.
X   */
X  
! #include "m-vax.h"
X  
X  
X  /***************************** OWNERSHIP ***************************
--- 140,146 ----
X   *	conf/m-template.h as a starting point for writing you own.
X   */
X  
! #include "m-sparc.h"
X  
X  
X  /***************************** OWNERSHIP ***************************
***************
*** 192,198 ****
X   */
X  
X  #define BIN_DIRECTORY	"/usr/local/bin"
! #define LIB_DIRECTORY	"/usr/local/libdata/nn" /* */
X  
X  
X  /**************************** DATABASE LOCATION **************************
--- 192,198 ----
X   */
X  
X  #define BIN_DIRECTORY	"/usr/local/bin"
! #define LIB_DIRECTORY	"/var/apps/nn"
X  
X  
X  /**************************** DATABASE LOCATION **************************
***************
*** 224,230 ****
X   *	     (The file system must support long file names!!)
X   */
X  
! #define DB_DIRECTORY	"/usr/spool/news/nn" /* */
X  
X  
X  /*************************** NEWS TRANSPORT **************************
--- 224,230 ----
X   *	     (The file system must support long file names!!)
X   */
X  
! #define DB_DIRECTORY	"/var/nn"
X  
X  
X  /*************************** NEWS TRANSPORT **************************
***************
*** 246,253 ****
X   *				  Default: NEWS_LIB_DIR/{rm,del}group
X   */
X  
! #define NEWS_DIRECTORY		"/usr/spool/news"	/* */
! #define NEWS_LIB_DIRECTORY	"/usr/lib/news"		/* */
X  
X  #define INEWS_PATH		"/usr/local/bin/inews"	/* */
X  
--- 246,253 ----
X   *				  Default: NEWS_LIB_DIR/{rm,del}group
X   */
X  
! #define NEWS_DIRECTORY		"/var/news"	/* */
! #define NEWS_LIB_DIRECTORY	"/var/apps/news"		/* */
X  
X  #define INEWS_PATH		"/usr/local/bin/inews"	/* */
X  
***************
*** 324,336 ****
X   *	DAEMON_MAN	- nnmaster
X   */
X  
! #define USER_MAN_DIR 	"/usr/man/man1" /* */
X  #define USER_MAN_SECTION 	"1"
X  
! #define SYS_MAN_DIR 	"/usr/man/man1" /* */
! #define SYS_MAN_SECTION 	"1"
X  
! #define DAEMON_MAN_DIR 	"/usr/man/man8" /* */
X  #define DAEMON_MAN_SECTION 	"8"
X  
X  
--- 324,336 ----
X   *	DAEMON_MAN	- nnmaster
X   */
X  
! #define USER_MAN_DIR 	"/usr/local/share/man/man1"
X  #define USER_MAN_SECTION 	"1"
X  
! #define SYS_MAN_DIR 	"/usr/local/share/man/man1"
! #define SYS_MAN_SECTION 	"1m"
X  
! #define DAEMON_MAN_DIR 	"/usr/local/share/man/man8"
X  #define DAEMON_MAN_SECTION 	"8"
X  
X  
diff -r -c -b nn/global.c nn-6.4.18/global.c
*** nn/global.c	Wed Jul 21 21:53:06 1993
--- nn-6.4.18/global.c	Wed Jul 21 21:33:52 1993
***************
*** 52,65 ****
X  export int mail_errors_mode = 2;
X  
X  #ifdef HAVE_MULTIGROUP
! #ifndef NGROUPS
! #include <sys/param.h>
X  #endif
X  #ifndef GIDSET_TYPE
X  #define GIDSET_TYPE int
X  #endif
X  static int ngroups;
! static GIDSET_TYPE gidset[NGROUPS];
X  
X  static in_grplist(gid)
X  GIDSET_TYPE gid;
--- 52,65 ----
X  export int mail_errors_mode = 2;
X  
X  #ifdef HAVE_MULTIGROUP
! #ifndef NGROUPS_MAX
! #include <limits.h>
X  #endif
X  #ifndef GIDSET_TYPE
X  #define GIDSET_TYPE int
X  #endif
X  static int ngroups;
! static GIDSET_TYPE gidset[NGROUPS_MAX];
X  
X  static in_grplist(gid)
X  GIDSET_TYPE gid;
***************
*** 191,197 ****
X      user_id = getuid();
X  
X  #ifdef HAVE_MULTIGROUP
!     ngroups = getgroups(NGROUPS, gidset);	/* Get users's group set */
X  #endif
X      group_id = getegid();
X      user_eid = geteuid();
--- 191,197 ----
X      user_id = getuid();
X  
X  #ifdef HAVE_MULTIGROUP
!     ngroups = getgroups(NGROUPS_MAX, gidset);	/* Get users's group set */
X  #endif
X      group_id = getegid();
X      user_eid = geteuid();
diff -r -c -b nn/nntp.c nn-6.4.18/nntp.c
*** nn/nntp.c	Wed Jul 21 21:53:02 1993
--- nn-6.4.18/nntp.c	Wed Jul 21 21:33:59 1993
***************
*** 34,42 ****
X  #include <errno.h>
X  
X  /* This is necessary due to the definitions in m-XXX.h */
- #if !defined(NETWORK_DATABASE) && defined(NETWORK_BYTE_ORDER)
X  #include <netinet/in.h>
- #endif
X  
X  #ifdef EXCELAN
X  #ifndef IPPORT_NNTP
--- 34,40 ----
***************
*** 287,300 ****
X  	sleep(10);
X      }
X  
!     bzero((char *) &sin, sizeof(sin));
X      sin.sin_family = hp->h_addrtype;
X      sin.sin_port = sp->s_port;
X  
X  #else /* EXCELAN */
X      char *machine;
X  
!     bzero((char*) &sin, sizeof(sin));
X      sin.sin_family = AF_INET;
X      sin.sin_port = htons(0);
X  #endif  /* EXCELAN */
--- 285,298 ----
X  	sleep(10);
X      }
X  
!     memset((char *) &sin, (char) 0, sizeof(sin));
X      sin.sin_family = hp->h_addrtype;
X      sin.sin_port = sp->s_port;
X  
X  #else /* EXCELAN */
X      char *machine;
X  
!     memset((char*) &sin, (char) 0, sizeof(sin));
X      sin.sin_family = AF_INET;
X      sin.sin_port = htons(0);
X  #endif  /* EXCELAN */
***************
*** 306,312 ****
X      for (cp = hp->h_addr_list; cp && *cp; cp++) {
X  	s = socket(hp->h_addrtype, SOCK_STREAM, 0);
X  	if (s < 0) goto sock_err;
! 	bcopy(*cp, (char *)&sin.sin_addr, hp->h_length);
X  
X  	x = connect(s, (struct sockaddr *)&sin, sizeof (sin));
X  	if (x == 0)
--- 304,310 ----
X      for (cp = hp->h_addr_list; cp && *cp; cp++) {
X  	s = socket(hp->h_addrtype, SOCK_STREAM, 0);
X  	if (s < 0) goto sock_err;
! 	memmove((char *)&sin.sin_addr, *cp, hp->h_length);
X  
X  	x = connect(s, (struct sockaddr *)&sin, sizeof (sin));
X  	if (x == 0)
***************
*** 338,344 ****
X  	goto sock_err;
X      
X      /* And then connect */
!     bcopy(hp->h_addr, (char *) &sin.sin_addr, hp->h_length);
X      if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) < 0)
X  	goto conn_err;
X  #endif  /* EXCELAN */
--- 336,342 ----
X  	goto sock_err;
X      
X      /* And then connect */
!     memmove((char *) &sin.sin_addr, hp->h_addr, hp->h_length);
X      if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) < 0)
X  	goto conn_err;
X  #endif  /* EXCELAN */
SHAR_EOF
chmod 0644 nn.pat ||
echo 'restore of nn.pat failed'
Wc_c="`wc -c < 'nn.pat'`"
test 7307 -eq "$Wc_c" ||
	echo 'nn.pat: original size 7307, current size' "$Wc_c"
fi
exit 0
-- 
As CSO, Service was our middle name.  Now as CCSO, it's next to last.
	-- Anonymous	(btw, :-) for the humor-impaired)
Technical Details
Message-ID: <22l0ji$rhb@vixen.cso.uiuc.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!ux1.cso.uiuc.edu!vixen.cso.uiuc.edu!uxc.cso.uiuc.edu!paul
References: <22jpliINN827@matt.ksu.ksu.edu>

Show Full Headers
Complete Article Headers
Message-ID: <22l0ji$rhb@vixen.cso.uiuc.edu>
Subject: Re: s-solaris2-1.h config file for Solaris?
Date: Thu, 22 Jul 1993 03:12:50 +0000
From: paul@uxc.cso.uiuc.edu (Paul Pomes - UofIllinois CCSO)
References: <22jpliINN827@matt.ksu.ksu.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.nn.mbox.zip!gmd.de!xlink.net!howland.reston.ans.net!ux1.cso.uiuc.edu!vixen.cso.uiuc.edu!uxc.cso.uiuc.edu!paul
Newsgroups: news.software.nn
Organization: University of Illinois at Urbana
Lines: 479
Reply-To: Paul-Pomes@uiuc.edu
NNTP-Posting-Host: uxc.cso.uiuc.edu