swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] system calls question


From: Darold Higa
Subject: Re: [Swarm-Support] system calls question
Date: Wed, 26 Feb 2003 21:58:22 -0800

On Wednesday 26 February 2003 07:59 pm, you wrote:

Thanks!  I just want to insure that I can recompile this code elsewhere.

Darold Higa

> mkdir() and chdir() are standard posix calls, so should work the same
> way on all posix systems, or under Cygwin. For cp, you could possibly
> get away with system("cp ... "), but this relies on there being a "cp"
> program in your path. Alternative, you can code your own - its about 5
> lines of C code:
>
> FILE* in=fopen("",r), out=fopen("",w);
> char *buf[SZ]; int sz;
> while ((sz=fread(buf,SZ,1,in))==SZ) fwrite(buf,sz,1,out);
> fwrite(buf,sz,1,out);
> fclose(in); fclose(out);
>
>                                               Cheers
>
> Darold Higa wrote:
> > Is there any way to insure that system calls compile cross platform?
> >
> > I need to use mkdir and cp so that I can organize all the pixmaps I'm
> > collecting.
> >
> > I know this is not directly Swarm related, but I would appreciate the
> > help.
> >
> > Thanks!
> >
> > Darold Higa
> > _______________________________________________
> > Support mailing list
> > address@hidden
> > http://www.swarm.org/mailman/listinfo/support
>
> ---------------------------------------------------------------------------
>- A/Prof Russell Standish               Director
> High Performance Computing Support Unit, Phone 9385 6967, 8308 3119
> (mobile) UNSW SYDNEY 2052                              Fax   9385 6965, 0425
> 253119 (") Australia                                   address@hidden
> Room 2075, Red Centre                   
> http://parallel.hpc.unsw.edu.au/rks International prefix  +612, Interstate
> prefix 02
> ---------------------------------------------------------------------------
>- _______________________________________________
> Support mailing list
> address@hidden
> http://www.swarm.org/mailman/listinfo/support


reply via email to

[Prev in Thread] Current Thread [Next in Thread]