| Summary: | ftruncate should be visible when including <unistd.h> without XSI features | ||
|---|---|---|---|
| Product: | glibc | Reporter: | Sebastien Decugis <sebastien.decugis> |
| Component: | libc | Assignee: | Ulrich Drepper <drepper.fsp> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | glibc-bugs |
| Priority: | P3 | Flags: | fweimer:
security-
|
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Host: | Target: | ||
| Build: | Last reconfirmed: | ||
| Project(s) to access: | ssh public key: | ||
| Bug Depends on: | |||
| Bug Blocks: | 724 | ||
Fixed. But this has nothing to do with nptl, chose the component correctly. Subject: Bug 640 CVSROOT: /cvs/glibc Module name: libc Branch: glibc-2_3-branch Changes by: roland@sources.redhat.com 2005-02-16 10:09:07 Modified files: posix : unistd.h Log message: 2005-01-06 Ulrich Drepper <drepper@redhat.com> * posix/unistd.h: Declare ftruncate for POSIX 2003. [BZ #640] Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/posix/unistd.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.130&r2=1.130.4.1 |
According to the SUSv3, ftruncate(...) routine shall be visible when including unistd.h; but it is not when _POSIX_C_SOURCE only is defined (no XSI features). Sample code: ---------------- #define _POSIX_C_SOURCE 200112L #include <unistd.h> #include <sys/types.h> typedef int (*ftruncate_test)(int fildes, off_t length); int dummyfcn (void) { ftruncate_test dummyvar; dummyvar = ftruncate; return 0; }