* include/unistd.h (ftruncate): Add inline definition.
* mingwex/ftruncate.c: New file. * mingwex/Makefile.in: Add ftruncate.o to libmingwex.a.
This commit is contained in:
parent
8261a23149
commit
1b0314715b
|
@ -1,3 +1,9 @@
|
|||
2004-07-11 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* include/unistd.h (ftruncate): Add inline definition.
|
||||
* mingwex/ftruncate.c: New file.
|
||||
* mingwex/Makefile.in: Add ftruncate.o to libmingwex.a.
|
||||
|
||||
2004-07-10 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
* include/time.h: Do not include sys/types.h.
|
||||
|
|
|
@ -14,4 +14,20 @@
|
|||
#include <getopt.h>
|
||||
#undef __UNISTD_GETOPT__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* This is defined as a real library function to allow autoconf
|
||||
to verify its existence. */
|
||||
int ftruncate(int, off_t);
|
||||
__CRT_INLINE int ftruncate(int __fd, off_t __length)
|
||||
{
|
||||
return _chsize (__fd, __length);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _UNISTD_H */
|
||||
|
|
|
@ -29,8 +29,8 @@ DISTFILES = Makefile.in configure configure.in \
|
|||
_Exit.c atoll.c dirent.c feclearexcept.c fegetenv.c \
|
||||
fegetexceptflag.c fegetround.c feholdexcept.c feraiseexcept.c \
|
||||
fesetenv.c fesetexceptflag.c fesetround.c fetestexcept.c \
|
||||
feupdateenv.c fwide.c getopt.c imaxabs.c imaxdiv.c ldtoa.c \
|
||||
lltoa.c lltow.c mbsinit.c mingw-fseek.c sitest.c strtof.c \
|
||||
feupdateenv.c ftruncate.c fwide.c getopt.c imaxabs.c imaxdiv.c \
|
||||
ldtoa.c lltoa.c lltow.c mbsinit.c mingw-fseek.c sitest.c strtof.c \
|
||||
strtoimax.c strtold.c strtoumax.c testwmem.c ulltoa.c ulltow.c \
|
||||
wcstof.c wcstoimax.c wcstold.c wcstoumax.c wdirent.c wmemchr.c \
|
||||
wmemcmp.c wmemcpy.c wmemmove.c wmemset.c wtoll.c
|
||||
|
@ -147,7 +147,7 @@ FENV_OBJS = fesetround.o fegetround.o \
|
|||
feclearexcept.o feholdexcept.o fegetexceptflag.o \
|
||||
feraiseexcept.o fetestexcept.o fesetexceptflag.o
|
||||
POSIX_OBJS = \
|
||||
dirent.o wdirent.o getopt.o
|
||||
dirent.o wdirent.o getopt.o ftruncate.o
|
||||
REPLACE_OBJS = \
|
||||
mingw-fseek.o
|
||||
COMPLEX_OBJS = \
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#include <unistd.h>
|
||||
int ftruncate(int __fd, off_t __length)
|
||||
{
|
||||
return _chsize (__fd, __length);
|
||||
}
|
Loading…
Reference in New Issue