[comp.unix.xenix] mkdir in SCO XEN*X

dan@hrc.UUCP (Dan Troxel) (12/24/88)

When installing news on SCO 386, I get an error of no mkdir code in the
archives. How do I get news to compile with mkdir???
-- 
Dan Troxel @ Handwriting Research Corporation  -  UUCP: ncar!noao!asuvax!hrc!dan
2821 E. Camelback Road - Suite 600 -  Phoenix, AZ  85016       WK 1-602-957-8870

det@hawkmoon.MN.ORG (Derek E. Terveer) (01/08/89)

In article <197656@hrc.UUCP>, dan@hrc.UUCP (Dan Troxel) writes:
> 
> When installing news on SCO 386, I get an error of no mkdir code in the
> archives. How do I get news to compile with mkdir???
  ^^^^^^^^
  I think you mean "libraries" here.

I ran into the same problem when installing News on one of my machines.  I
believe that the problem is that the way you have installed it, News expects
there to be a library call called mkdir() in the system library.  A lot of
older unix systems do not have this feature.  I think also that there is a
constant (#define) in either the makefile or the defs.h file that specifies
whether or not mkdir exists as a system call.  It may be called MKDIRSUB or
something similar.  In any event if that doesn't work, one can always create a
small C subroutine called mkdir like the following and link it in with the rest
of the News code:

int
mkdir(directory_to_create)

	char   *directory_to_create;

{	char	buf[BUFSIZ];

 sprintf(buf,"mkdir %s",buf);
 return(system(buf));
}  /* mkdir */

Note however, that some systems have a bug that causes an apparently random
return value to be returned from the system() call, which means that you would
have to change the last two lines of the above function to:

 system(buf);
 return(0);


Derek
(caveat emptor!)
-- 
Derek Terveer 	    det@hawkmoon.MN.ORG || ..!uunet!rosevax!elric!hawkmoon!det
		    w(612)681-6986   h(612)688-0667

"A proper king is crowned" -- Thomas B. Costain