[comp.sources.d] mbase is missing something - ie remove function

rajkumar@plains.NoDak.edu (A. Joseph Rajkumar) (01/04/91)

Hi

  I would appreciate knowing if anyone has got mbase to compile
correctly. I tried it and it seems a remove function is missing.
Please correct me if I am wrong, I just want to get it to compile.

Thanks

Joseph Rajkumar
email:- rajkumar@plains.NoDak.edu

gordon@prls.UUCP (Gordon Vickers) (01/08/91)

In article <7389@plains.NoDak.edu> rajkumar@plains.NoDak.edu (A. Joseph Rajkumar) writes:
>Hi
>
>  I would appreciate knowing if anyone has got mbase to compile
>correctly. I tried it and it seems a remove function is missing.

      Yes, remove() is missing. It is called only once and it's argument
          is just a charector string.  I replaced it with code that simply
          nulls the argument string. This is problable wrong but at least
          it allowed me to compile (but not test) the program.

      Also missing is the file enctest.c, which is why I did not test the
          program.

      I also made the following "corrections" needed (at least on) Ultrix :
        o  File: Makefile
              line: cc sample ....
              change: deleted space from between -L ${LIBDIR}
        o  File: Makefile
               added compiler flag -DUNIX
                purpose: build.c requires UNIX to be defined is you are
                          running Unix. The -DUNIX flag for the compiler
                          will do this.  I could have put a #define UNIX
                          into build.c but it really belongs in Makefile
                          should it be needed later by other files that
                          are patched or enhanced.

Gordon Vickers 408/991-5370        {mips,pyramid|philabs}!prls!gordon  
Signetics in Sunnyvale,Ca (USA)
The Earth is a complex array of symbiotic relationships: Every extinction,
  whether animal, mineral, vegetable, or cultural hastens our own demise.

woods@eci386.uucp (Greg A. Woods) (01/09/91)

In article <49906@prls.UUCP> gordon@prls.UUCP (Gordon Vickers) writes:
>       I also made the following "corrections" needed (at least on) Ultrix :
>         o  File: Makefile
>                added compiler flag -DUNIX
>                 purpose: build.c requires UNIX to be defined is you are
>                           running Unix. The -DUNIX flag for the compiler
>                           will do this.  I could have put a #define UNIX
>                           into build.c but it really belongs in Makefile
>                           should it be needed later by other files that
>                           are patched or enhanced.

This isn't necessarily directed at Gordon, since he's only working
around a "bug"....

I've *NEVER* seen anything resembling UNIX that doesn't implicitly
"-dunix" in the preprocessor and I've even seen some things that
aren't really UNIX that do so too.

If you want to use "#ifdef UNIX" instead of "#ifdef unix", you can always:

	#ifdef unix
	# define UNIX	1
	#endif

in some global header file.

IMHO, The fix does NOT belong in the Makefile.
-- 
							Greg A. Woods
woods@{eci386,gate,robohack,ontmoh,tmsoft}.UUCP		ECI and UniForum Canada
+1-416-443-1734 [h]  +1-416-595-5425 [w]  VE3TCP	Toronto, Ontario CANADA
Political speech and writing are largely the defense of the indefensible-ORWELL

root@gold.doit.sub.org (Christian Seyb) (01/09/91)

In <49906@prls.UUCP> gordon@prls.UUCP (Gordon Vickers) writes:

>>  I would appreciate knowing if anyone has got mbase to compile
>>correctly. I tried it and it seems a remove function is missing.

>      Yes, remove() is missing. It is called only once and it's argument
>          is just a charector string.  I replaced it with code that simply

On ISC Unix 2.2 you can find remove in /lib/libcposix.c.

>      Also missing is the file enctest.c, which is why I did not test the
>          program.

This one is really missing :-(

regards Christian
-- 
Christian Seyb      |  Internet: cs@gold.doit.sub.org   uucp login: nuucp 
Fuchsweg 86         |  Mailbox:  +49-8106-34593   24h   300-19200 PEP/V.32
8011 Baldham        |            +49-8106-34692   24h   300-19200 HST
-- Lieber fuenf vor Zwoelf, als gar keine nach Eins.

rbp@investor.pgh.pa.us (Bob Peirce #305) (01/10/91)

In article <49906@prls.UUCP> gordon@prls.UUCP (Gordon Vickers) writes:
>In article <7389@plains.NoDak.edu> rajkumar@plains.NoDak.edu (A. Joseph Rajkumar) writes:
>>Hi
>>
>>  I would appreciate knowing if anyone has got mbase to compile
>>correctly. I tried it and it seems a remove function is missing.
>
>      Yes, remove() is missing. It is called only once and it's argument
>          is just a charector string.  I replaced it with code that simply
>          nulls the argument string. This is problable wrong but at least
>          it allowed me to compile (but not test) the program.
>
The call to remove comes after the question of whether you want to
overwrite an existing relation.  The implication is the file is removed,
so I substituted unlink(rel).  This seems to work.

I had a problem with the system call to chmod, so I called chmod()
directly.  I wonder why he uses 0755?
-- 
Bob Peirce, Pittsburgh, PA				  412-471-5320
...!uunet!pitt!investor!rbp			rbp@investor.pgh.pa.us