11-05-2002
Ansi C has to work just about everywhere. So it assumes only a simple view of its environment. Posix on the other hand assumes a very powerful operating system.
As one example, look at signals. With posix you can send a signal to another process via the kill() system call. You specify which process gets the signal by supplying a pid. Ansi c only has a wimpy raise() which lets a process send a signal to itself. This is because Ansi C does not assume that it is even possible to run several processes at once. You won't find a pid in any Ansi C call. Posix demands multiple processes. Ansi C does not.
10 More Discussions You Might Find Interesting
1. Programming
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)
Discussion started by: REM
1 Replies
2. Programming
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)
Discussion started by: Frankie
4 Replies
3. HP-UX
Hi! Can anyone help me with the problem i am having. Im new to hpux and i am trying to set up the programs i use. One such program is the irc client BitchX, ive ran it on several pc/sun boxes with no problems. On my c360 with an fx6 card and a eizo f56 17in monitor (1024x768 85hz vesa) the ansi... (0 Replies)
Discussion started by: Lewis
0 Replies
4. HP-UX
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)
Discussion started by: shawnbishop
3 Replies
5. Programming
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)
Discussion started by: dhaval chevli
2 Replies
6. Shell Programming and Scripting
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)
Discussion started by: ssmallya
0 Replies
7. HP-UX
I want to convert a file from Unix-ANSI to PC-ANSI format. How can i achieve that? (0 Replies)
Discussion started by: ssmallya
0 Replies
8. HP-UX
Hi,
How can i find which ansi c precompiler are installed on my hp-ux b11.23 itanuim machine ?
Thanks (3 Replies)
Discussion started by: yoavbe
3 Replies
9. Programming
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)
Discussion started by: sehang
2 Replies
10. Programming
I have very little experience with gcc compilation under different environments, so please bear with me. I carried over 20 years old project into Ubuntu 18.04, it has old style K&R parameters, no function declarations to speak of, many functions without return are not declared void, and on and... (8 Replies)
Discussion started by: migurus
8 Replies
PCC(1) General Commands Manual PCC(1)
NAME
pcc - APE C compiler driver
SYNOPSIS
pcc [ option ... ] [ name ... ]
DESCRIPTION
Pcc compiles and loads C programs, using APE (ANSI C/POSIX) include files and libraries. Named files ending with .c are preprocessed with
cpp(1), then compiled with one of the compilers described in 2c(1), as specified by the environment variable $objtype. The object files
are then loaded using one of the loaders described in 2l(1). The options are:
-o out Place loader output in file out instead of the default 2.out, v.out, etc.
-P Omit the compilation and loading phases; leave the result of preprocessing name.c in name.i.
-c Omit the loading phase.
-p Insert profiling code into the executable output.
-w Print compiler warning messages.
-B Don't complain about functions used without ANSI function prototypes.
-v Echo the preprocessing, compiling, and loading commands before they are executed.
-Dname=def
-Dname Define the name to the preprocessor, as if by If no definition is given, the name is defined as
-Uname Undefine the name to the preprocessor, as if by
-Idir files whose names do not begin with are always sought first in the directory of the file argument, then in directories named in
-I options, then in /$objtype/include/ape.
-N Don't optimize compiled code.
-S Print an assembly language version of the object code on standard output.
-a Instead of compiling, print on standard output acid functions (see acid(1)) for examining structures declared in the source
files.
-aa Like -a except that functions for structures declared in included header files are omitted.
The APE environment contains all of the include files and library routines specified in the ANSI C standard (X3.159-1989), as well as those
specified in the IEEE Portable Operating System Interface standard (POSIX, 1003.1-1990, ISO 9945-1). In order to access the POSIX rou-
tines, source programs should define the preprocessor constant _POSIX_SOURCE.
FILES
/sys/include/ape
directory for machine-independent #include files.
/$objtype/include/ape
directory for machine-dependent #include files.
/$objtype/lib/ape/libap.a
ANSI C/POSIX library.
SEE ALSO
cpp(1), 2c(1), 2a(1), 2l(1), mk(1), nm(1), acid(1), db(1), prof(1)
Howard Trickey, ``APE -- The ANSI/POSIX Environment''
SOURCE
/sys/src/cmd/pcc.c
BUGS
The locale manipulation functions are minimal. Signal functions and terminal characteristic handlers are only minimally implemented. Link
always fails, because Plan 9 doesn't support multiple links to a file. The functions related to setting effective user and group ids can-
not be implemented because the concept doesn't exist in Plan 9.
PCC(1)