Dear Customer, Enclosed you will find the 2.3.1 Dev Sys Support Level Supplement (SLS) lng244. This SLS contains new 286 and 386 C compiler passes, event libraries, and an incremental loader (ldr). This SLS is specifically designed for the SCO XENIX 386 Development System Release 2.3.1. Do not install this SLS on any other release of the SCO XENIX System V Development System. To determine what release of the development system you have, either refer to your Release Notes or type "grep rel= /etc/perms/soft". Installing this disk will correct the following problems: For the 386 compiler passes - Corrects a multiple pointer assignment problem. (assign.c) - Allows "float" variables to be prototyped correctly. (float.c) For the 286 compiler passes - Allows the "L" operator to work correctly. (l.c) - Corrects problems with "long" variables overflowing. (long.c) For the incremental loader (ldr) - Understands the record type 0xb5 for static functions. (ldr.c) For the event libraries - ev_close(S) now closes the mouse configuration files /usr/lib/event/devices and /usr/lib/event/ttys opened by ev_init(S). Test programs for the compiler pass problems and the loader problem have been supplied on the diskette and will be placed in the directory /usr/lib/sls/lng244. These programs are also supplied on the following pages. The files replaced by this diskette are: /lib/386/c_1p /lib/p1 /lib/386/Slibevent.a /lib/Llibevent.a /lib/386/p2_386 /lib/p2 /lib/Slibevent.a /lib/Clibevent.a /lib/386/p3_386m /lib/p3 /lib/Mlibevent.a /lib/ldr Support Level Supplement lng244 will install on machines running: SCO XENIX 386 Development System Release 2.3.1 SCO XENIX 386 Operating System Release 2.3.0 and later Do not install this SLS on the SCO XENIX 386 Development System Release 2.3.0 or earlier. To install this SLS, take the following steps: (1) Reboot your system and enter System Maintenance mode. (2) Insert the enclosed disk in the primary floppy drive and close the door. (3) Type "/etc/install" and follow the prompts. If you have any questions, please call our SCO Customer Services Department at (800) 347-4381. SCO Customer Service is available Monday through Friday, 6 A.M. to 5 P.M., Pacific Time. We appreciate your business. SCO Support Services /* Test program assign.c ** To compile: cc assign.c 2.3.1 Dev Sys SLS corrects this problem ** The 386 C compiler produces incorrect code when the multiple pointer ** assignment is executed. Individual assignments work correctly. */ #include main() { struct tag { char x, y, z; } foo, *fooptr; fooptr = (struct tag *) malloc(sizeof(struct tag)); /* This multiple pointer assignment fails if lng244 isn't installed. */ fooptr->x = fooptr->y = fooptr->z = 1; printf("\nfooptr->x=%d, fooptr->y=%d, fooptr->z=%d\n", fooptr->x, fooptr->y, fooptr->z); fooptr->x = 1; /* individual assignments work */ fooptr->y = 1; fooptr->z = 1; printf("fooptr->x=%d, fooptr->y=%d, fooptr->z=%d\n", fooptr->x, fooptr->y, fooptr->z); } /* Test program float.c ** To compile: cc float.c 2.3.1 Dev Sys SLS corrects this problem ** The 386 C compiler does not handle float prototypes correctly. */ float foo(float fl) { printf("\nThe prototyped float fl = %f", fl); return(fl); } void main() { float fl = 1.0; foo(fl); printf("\nThe return value of foo = %f\n", foo(fl)); } /* Test program long.c ** To compile: cc -M2l long.c 2.3.1 Dev Sys SLS corrects this problem ** Corrects problems with "long" variables being treated as "integer" ** variables. Note that the integer on the 80286 is 2 bytes not 4 bytes. */ main() { long val = 0; long val1 = -40000; if (val > val1) printf("Right: %ld is greater then %ld\n", val, val1); else printf("Wrong: %ld is greater then %ld\n", val1, val); } /* Test program l.c ** To compile: cc -M2l l.c 2.3.1 Dev Sys SLS corrects this problem ** Corrects problems with the 'L' operator not working when ** compiling for small, medium, and large model code. */ main() { printf("%ld %ld\n", 40000L, 96000L); /* prints "1996528704 1" 'L' is not working */ printf("%ld %ld\n", (long) 40000, (long) 96000); /* Casting works */ } /* Test program ldr.c ** To compile: 2.3.1 Dev Sys SLS corrects this problem ** cc -M3s -c ldr.c - Let cc create ldr.o ** ld -r ldr.o -o ldr_inc.o - Run ldr. Error occurs here. ** cc -M3s ldr_inc.o - Let cc create a.out ** ** Corrects problems with the incremental loader. It now understands ** the new record type 0xb5 for static functions. The broken version ** of ldr, when run, caused the error: ** ld: error file ldr.o(ldr.c) record 13 unknown record type 0xb5 */ static int foo() { printf("Hello world\n"); } main () { foo(); }