vos/Makefile A helper for maintaining the config.*.* in UNIX
vos/perl.bind VOS bind control file
vos/test_vos_dummies.c Test program for "vos_dummies.c"
+vos/vos.c VOS emulations for missing POSIX functions
vos/vosish.h VOS-specific header file
vos/vos_dummies.c Wrappers to soak up undefined functions
warnings.h The warning numbers
# Make command.
make="/system/gnu_library/bin/gmake"
-_make="/system/gnu_library/bin/gmake"
+# indented to not put it into config.sh
+ _make="/system/gnu_library/bin/gmake"
# Architecture name
archname="hppa1.1"
# VOS has a link() function but it is a dummy.
d_link="undef"
+
+# VOS does not have truncate() but we supply one in vos.c
+d_truncate="define"
+archobjs="vos.o"
+
+# Help gmake find vos.c
+test -h vos.c || ln -s vos/vos.c vos.c
--- /dev/null
+/* Beginning of modification history */
+/* Written 02-01-02 by Nick Ing-Simmons (nick@ing-simmons.net) */
+/* End of modification history */
+
+/* VOS doesn't supply a truncate function, so we build one up
+ from the available POSIX functions. */
+
+#include <fcntl.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+int
+truncate(const char *path, off_t len)
+{
+ int fd = open(path,O_WRONLY);
+ int code = -1;
+ if (fd >= 0) {
+ code = ftruncate(fd,len);
+ close(fd);
+ }
+ return code;
+}
/* The following declaration is an avoidance for posix-950. */
extern int ioctl (int fd, int request, ...);
+
+/* Specify a prototype for truncate() since we are supplying one. */
+extern int truncate (const char *path, off_t len);