* 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,8 +1,14 @@
|
||||||
2004-07-10 Danny Smith <dannysmith@users.sourceforge.net>
|
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.
|
* include/time.h: Do not include sys/types.h.
|
||||||
|
|
||||||
2004-07-02 Danny Smith <dannysmith@users.sourceforge.net>
|
2004-07-02 Danny Smith <dannysmith@users.sourceforge.net>
|
||||||
|
|
||||||
* mingwex/Makefile.in (MATH_DISTFILES): Remove pow.c,
|
* mingwex/Makefile.in (MATH_DISTFILES): Remove pow.c,
|
||||||
(MATH_OBJS): Remove pow,o.
|
(MATH_OBJS): Remove pow,o.
|
||||||
|
|
|
@ -14,4 +14,20 @@
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#undef __UNISTD_GETOPT__
|
#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 */
|
#endif /* _UNISTD_H */
|
||||||
|
|
|
@ -29,8 +29,8 @@ DISTFILES = Makefile.in configure configure.in \
|
||||||
_Exit.c atoll.c dirent.c feclearexcept.c fegetenv.c \
|
_Exit.c atoll.c dirent.c feclearexcept.c fegetenv.c \
|
||||||
fegetexceptflag.c fegetround.c feholdexcept.c feraiseexcept.c \
|
fegetexceptflag.c fegetround.c feholdexcept.c feraiseexcept.c \
|
||||||
fesetenv.c fesetexceptflag.c fesetround.c fetestexcept.c \
|
fesetenv.c fesetexceptflag.c fesetround.c fetestexcept.c \
|
||||||
feupdateenv.c fwide.c getopt.c imaxabs.c imaxdiv.c ldtoa.c \
|
feupdateenv.c ftruncate.c fwide.c getopt.c imaxabs.c imaxdiv.c \
|
||||||
lltoa.c lltow.c mbsinit.c mingw-fseek.c sitest.c strtof.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 \
|
strtoimax.c strtold.c strtoumax.c testwmem.c ulltoa.c ulltow.c \
|
||||||
wcstof.c wcstoimax.c wcstold.c wcstoumax.c wdirent.c wmemchr.c \
|
wcstof.c wcstoimax.c wcstold.c wcstoumax.c wdirent.c wmemchr.c \
|
||||||
wmemcmp.c wmemcpy.c wmemmove.c wmemset.c wtoll.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 \
|
feclearexcept.o feholdexcept.o fegetexceptflag.o \
|
||||||
feraiseexcept.o fetestexcept.o fesetexceptflag.o
|
feraiseexcept.o fetestexcept.o fesetexceptflag.o
|
||||||
POSIX_OBJS = \
|
POSIX_OBJS = \
|
||||||
dirent.o wdirent.o getopt.o
|
dirent.o wdirent.o getopt.o ftruncate.o
|
||||||
REPLACE_OBJS = \
|
REPLACE_OBJS = \
|
||||||
mingw-fseek.o
|
mingw-fseek.o
|
||||||
COMPLEX_OBJS = \
|
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