🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1723

minor changes for fileutils-1.0 under hp-ux

#1723
From: Chris Hanson
Date: Thu, 08 Feb 1990 18:52
78 lines
2715 bytes
The following simple changes to "cp.c" and "mv.c" improve these
programs when used under hp-ux.  The programs work fine without the
changes, but they work better with them.

*** cp.c.~1~	Sat Feb  3 13:47:13 1990
--- cp.c	Thu Feb  8 13:44:08 1990
***************
*** 160,166 ****
        egid = getegid ();
        ngroups = 1;
        groups = (int *) xmalloc (ngroups * sizeof *groups);
! #ifdef USG
        *groups = getgid ();
  #else
        for (;;)
--- 160,166 ----
        egid = getegid ();
        ngroups = 1;
        groups = (int *) xmalloc (ngroups * sizeof *groups);
! #if defined(USG) && !defined(hpux)
        *groups = getgid ();
  #else
        for (;;)
***************
*** 748,754 ****
    /* ??? Since USG doesn't have ftruncate, this can't be done.
       This should be fixed.  */
  
! #ifndef USG
    if (write (target_desc, "", 1) != 1
        || ftruncate (target_desc, n_read_total) < 0)
      error ("cannot write", errno, dst_path, FATAL);
--- 748,754 ----
    /* ??? Since USG doesn't have ftruncate, this can't be done.
       This should be fixed.  */
  
! #if !defined(USG) || defined(hpux)
    if (write (target_desc, "", 1) != 1
        || ftruncate (target_desc, n_read_total) < 0)
      error ("cannot write", errno, dst_path, FATAL);


*** mv.c.~1~	Fri Feb  2 22:57:45 1990
--- mv.c	Thu Feb  8 13:44:07 1990
***************
*** 91,97 ****
    return (stat (fn, &stb) >= 0 && (stb.st_mode & S_IFMT) == S_IFDIR);
  }
  
! #ifdef USG
  
  int
  rename (from, to)
--- 91,97 ----
    return (stat (fn, &stb) >= 0 && (stb.st_mode & S_IFMT) == S_IFDIR);
  }
  
! #if defined(USG) && !defined(hpux)
  
  int
  rename (from, to)
***************
*** 311,317 ****
  	      error (0, errno, "cannot create `%s'", to);
  	      return;
  	    }
! #ifdef USG
  	  chmod (to, stbf.st_mode & 0777);	/* again, can't fail */
  #else
  	  fchmod (ofd, stbf.st_mode & 0777);	/* again, can't fail */
--- 311,317 ----
  	      error (0, errno, "cannot create `%s'", to);
  	      return;
  	    }
! #if defined(USG) && !defined(hpux)
  	  chmod (to, stbf.st_mode & 0777);	/* again, can't fail */
  #else
  	  fchmod (ofd, stbf.st_mode & 0777);	/* again, can't fail */
Technical Details
Message-ID: <9002081852.AA00339@zurich.ai.mit.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!uunet!bu.edu!bu-cs!snorkelwacker!think!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!zurich.ai.mit.edu!cph

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!uunet!bu.edu!bu-cs!snorkelwacker!think!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!zurich.ai.mit.edu!cph
From: cph@zurich.ai.mit.edu (Chris Hanson)
Newsgroups: gnu.utils.bug
Subject: minor changes for fileutils-1.0 under hp-ux
Message-ID: <9002081852.AA00339@zurich.ai.mit.edu>
Date: 8 Feb 90 18:52:27 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 78