[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swarm-Support] system calls question
From: |
Russell Standish |
Subject: |
Re: [Swarm-Support] system calls question |
Date: |
Thu, 27 Feb 2003 14:59:33 +1100 (EST) |
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
----------------------------------------------------------------------------
- [Swarm-Support] MacOS X Packages updated, Bill Northcott, 2003/02/26
- Re: [Swarm-Support] MacOS X Packages updated, Ana Carrie, 2003/02/26
- Re: [Swarm-Support] MacOS X Packages updated, Bill Northcott, 2003/02/26
- Re: [Swarm-Support] MacOS X Packages updated, Ana Carrie, 2003/02/26
- Re: [Swarm-Support] MacOS X Packages updated, Bill Northcott, 2003/02/26
- Re: [Swarm-Support] MacOS X Packages updated, Bill Northcott, 2003/02/26
- [Swarm-Support] system calls question, Darold Higa, 2003/02/26
- Re: [Swarm-Support] system calls question,
Russell Standish <=
- Re: [Swarm-Support] system calls question, Darold Higa, 2003/02/27
- Re: [Swarm-Support] system calls question, Bill Northcott, 2003/02/26
- Re: [Swarm-Support] system calls question, Darold Higa, 2003/02/27
- Re: [Swarm-Support] system calls question, Bill Northcott, 2003/02/27
- Re: [Swarm-Support] MacOS X Packages updated, Ana Carrie, 2003/02/27
Re: [Swarm-Support] MacOS X Packages updated, Ana Carrie, 2003/02/26