Note that defining the feature test macro _xopen_source to have the value 1 as done by the following line in dodona's code in post #5 (and later duplicated in HongThai's code in post #8) as shown below:
without defining any other feature test macros asks for a programming environment that conforms to the interfaces as defined by The X/Open Portability Guide, Issue 3 (which was published in 1988). The only systems that I'm aware of that still support this programming environment are Solaris/SunOS systems distributed by Sun, Oracle, and Fujitsu.
The feature test macro I suggested in post #3 requests a much more commonly available programming environment.
I follow the description of wiki (Lamport's bakery algorithm - Wikipedia, the free encyclopedia), then implement that algorithm in C, but it doesn't work, Starving is still here, is the implementation worry?
Only print out:
Thread ID: 0 START!
Thread ID: 0 END!
Thread ID: 0 START!... (2 Replies)
Hi,
I am creating a file in Unix using a shell script. The file is getting created in the Unix - ANSI format. My requirement is to convert it to the PC - ANSI format. Can anyone tell me how to do this?
Thanks,
Sunil (0 Replies)
I am a student. And need help on following program. I want to make a c program.
I have to scan a sentence and I have to interchange a word from that sentence.
Example: Scan the sentence is " Drilling machine and Milling machine " . Replace the word "machine" by "operation". And output should... (2 Replies)
Good Day
I downloaded Server Evaluation copy of C/ANSI compiler, but when I try to compile a file with it, it gives me following error - (for HP-UX 11.11 v1 PA-RISC)
Internal Error: Codeword file /opt/ansic/newconfig/ansic.cwd missing or empty.
Detailed Errors are as follows
Internal... (3 Replies)
hi , I came acroos two functions fdopen() and freopen().
what is the difference between these two functions and where can they be used. Is it that fdopen() is used to write freopen().
Advance Thanks for your co-operation.
:) (1 Reply)
can somebody explain about the ANSI C vs POSIX. say i was using open and fopen, i know that open is POSIX, and fopen is ANSI C. i read that that POSIX is a system call and ANSI C is like a standard library function. wouldn't the fopen function has to call on open function anyway to open any kind... (2 Replies)
Dear All,
I have to develope some C functions in Unix for a Magic program. The original MSE code which compiles the attached C program uses a +z option, but the cc compiler don't know this. The complete command in the compiler script is 'cc -c -Aa +z myfile.c'. The warning message is 'The -z... (4 Replies)
To anyone that can answer this:
Are the differences great between the ANSI and K&R standard? What are some of the major differences between them??
-REM (1 Reply)