1 /* Beginning of modification history */
2 /* Written 02-01-02 by Nick Ing-Simmons (nick@ing-simmons.net) */
3 /* Modified 02-03-27 by Paul Green (Paul.Green@stratus.com) to
4 add socketpair() dummy. */
5 /* Modified 02-04-24 by Paul Green (Paul.Green@stratus.com) to
6 have pow(0,0) return 1, avoiding c-1471. */
7 /* Modified 06-09-25 by Paul Green (Paul.Green@stratus.com) to
9 /* Modified 08-02-04 by Paul Green (Paul.Green@stratus.com) to
10 open the syslog file in the working dir. */
11 /* Modified 11-10-17 by Paul Green to remove the dummy copies
12 of socketpair() and the syslog functions. */
13 /* End of modification history */
20 #include <sys/types.h>
23 /* VOS doesn't supply a truncate function, so we build one up
24 from the available POSIX functions. */
27 truncate(const char *path, off_t len)
29 int fd = open(path,O_WRONLY);
32 code = ftruncate(fd,len);
38 /* Supply a private version of the power function that returns 1
39 for x**0. This avoids c-1471. Abigail's Japh tests depend
40 on this fix. We leave all the other cases to the VOS C
43 double s_crt_pow(double *x, double *y);
48 if (y == 0e0) /* c-1471 */
54 return(s_crt_pow(&x,&y));