I have just made the jump from PC to Mac and as an obvious result am still getting some things figured out. I'm a student in a bachelor's CS program and we use linux/unix on the school's systems for compiling/developing etc. This was just fine with my HP laptop as I had it dual booting with Fedora Core and essentially complete compatibility with the school's compilers. I was thinking that I would be in the same situation or very similar once I made the jump to Mac. Well, I'm not so sure.
Consider the following line of C code:
...
open(pathname, O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR);
...
when I SSH over to the school's system and gcc my source file there it goes no problem and gives me my .out file that I can then execute etc etc. But, on the Mac when I gcc the source file I get:
gcc simple_fork1.c
simple_fork1.c: In function 'main':
simple_fork1.c: 'S_IRUSR' undeclared
and I get the undeclared for S_IWUSR
Now for my actual questions:
what are my options as far as developing code on my Mac that will be compatible with Linux/Unix?
Is my best bet to install linux in Virtual PC? (I've considered it, but dang it I would rather just use the Mac
)
thanks for any advice
Consider the following line of C code:
...
open(pathname, O_WRONLY|O_CREAT,S_IRUSR|S_IWUSR);
...
when I SSH over to the school's system and gcc my source file there it goes no problem and gives me my .out file that I can then execute etc etc. But, on the Mac when I gcc the source file I get:
gcc simple_fork1.c
simple_fork1.c: In function 'main':
simple_fork1.c: 'S_IRUSR' undeclared
and I get the undeclared for S_IWUSR
Now for my actual questions:
what are my options as far as developing code on my Mac that will be compatible with Linux/Unix?
Is my best bet to install linux in Virtual PC? (I've considered it, but dang it I would rather just use the Mac
thanks for any advice