🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #826

tar-1.11 and Solaris 2.0

#826
From: J.T. Conklin
Date: Fri, 11 Sep 1992 13:14
127 lines
3833 bytes
1. setsockopt in rmt.c needs cast to avoid prototype conflict

2. rmt needs to be linked with -lsocket and -lnsl.  I've added explicit
   tests for /lib/libsocket.a and /lib/libnsl.a in autoconf.in...  This
   may not be the way you want to do it.

3. Makefile.in changed to add $(LIBS) to link of rmt. see #2 above

4. None of the contortions to find out the page size in getpagesize.h
   worked.  If _SC_PAGESIZE is defined, use sysconf(_SC_PAGESIZE).

diff -c tar/Makefile.in:1.1.1.1 tar/Makefile.in:1.2
*** tar/Makefile.in:1.1.1.1	Fri Sep 11 20:13:43 1992
--- tar/Makefile.in	Fri Sep 11 20:13:43 1992
***************
*** 117,123 ****
  	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

  rmt:	rmt.c
! 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(srcdir)/rmt.c

  tar.info: tar.texinfo
  	makeinfo $(srcdir)/tar.texinfo
--- 117,123 ----
  	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

  rmt:	rmt.c
! 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(srcdir)/rmt.c $(LIBS)

  tar.info: tar.texinfo
  	makeinfo $(srcdir)/tar.texinfo
diff -c tar/configure:1.3 tar/configure:1.4
*** tar/configure:1.3	Fri Sep 11 20:13:44 1992
--- tar/configure	Fri Sep 11 20:13:44 1992
***************
*** 664,669 ****
--- 664,677 ----
    esac
  fi

+ if test -f /lib/libsocket.a; then
+ 	LIBS="$LIBS -lsocket"
+ fi
+
+ if test -f /lib/libnsl.a; then
+ 	LIBS="$LIBS -lnsl"
+ fi
+
  if test -n "$prefix"; then
    test -z "$exec_prefix" && exec_prefix='$(prefix)'
    prsub="s,^prefix[ 	]*=.*$,prefix = $prefix,"
diff -c tar/configure.in:1.3 tar/configure.in:1.4
*** tar/configure.in:1.3	Fri Sep 11 20:13:45 1992
--- tar/configure.in	Fri Sep 11 20:13:45 1992
***************
*** 53,56 ****
--- 53,64 ----
  AC_SUBST(MALLOC)
  AC_CONST
  AC_XENIX_DIR
+ if test -f /lib/libsocket.a; then
+ 	LIBS="$LIBS -lsocket"
+ fi
+
+ if test -f /lib/libnsl.a; then
+ 	LIBS="$LIBS -lnsl"
+ fi
+
  AC_OUTPUT(Makefile)
diff -c tar/getpagesize.h:1.1.1.1 tar/getpagesize.h:1.2
*** tar/getpagesize.h:1.1.1.1	Fri Sep 11 20:13:45 1992
--- tar/getpagesize.h	Fri Sep 11 20:13:45 1992
***************
*** 6,13 ****

  #ifndef HAVE_GETPAGESIZE

! #include <sys/param.h>

  #ifdef EXEC_PAGESIZE
  #define getpagesize() EXEC_PAGESIZE
  #else
--- 6,19 ----

  #ifndef HAVE_GETPAGESIZE

! #ifdef HAVE_UNISTD_H
! #include <unistd.h>
! #endif

+ #ifdef _SC_PAGESIZE
+ #define getpagesize() sysconf(_SC_PAGESIZE)
+ #else
+ #include <sys/param.h>
  #ifdef EXEC_PAGESIZE
  #define getpagesize() EXEC_PAGESIZE
  #else
***************
*** 20,25 ****
--- 26,32 ----
  #define getpagesize() NBPC
  #endif /* no NBPG */
  #endif /* no EXEC_PAGESIZE */
+ #endif /* no _SC_PAGESIZE */

  #endif /* not HAVE_GETPAGESIZE */

diff -c tar/rmt.c:1.1.1.1 tar/rmt.c:1.2
*** tar/rmt.c:1.1.1.1	Fri Sep 11 20:13:46 1992
--- tar/rmt.c	Fri Sep 11 20:13:46 1992
***************
*** 252,258 ****
  	maxrecsize = size;
  #ifdef SO_RCVBUF
  	while (size > 1024 &&
! 	       setsockopt(0, SOL_SOCKET, SO_RCVBUF, &size, sizeof (size)) < 0)
  		size -= 1024;
  #else
  	size= 1+((size-1)%1024);
--- 252,258 ----
  	maxrecsize = size;
  #ifdef SO_RCVBUF
  	while (size > 1024 &&
! 	       setsockopt(0, SOL_SOCKET, SO_RCVBUF, (char *) &size, sizeof (size)) < 0)
  		size -= 1024;
  #else
  	size= 1+((size-1)%1024);
Technical Details
Message-ID: <9209120314.AA26714@rangoon.gain.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!sdd.hp.com!spool.mu.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!gain.COM!jtc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!swrinde!sdd.hp.com!spool.mu.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!gain.COM!jtc
From: jtc@gain.COM (J.T. Conklin)
Newsgroups: gnu.utils.bug
Subject: tar-1.11 and Solaris 2.0
Message-ID: <9209120314.AA26714@rangoon.gain.com>
Date: 11 Sep 92 13:14:39 GMT
Sender: gnulists@ai.mit.edu
Reply-To: jtc@gain.com
Distribution: gnu
Organization: GAIN Technology Inc., Palo Alto, CA
Lines: 127
Approved: bug-gnu-utils@prep.ai.mit.edu