This is the mail archive of the java-prs@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/16472] New: jartool.c uses ftruncate, nonexistant on mingw32


The recent patch here:
http://gcc.gnu.org/ml/java-patches/2004-q2/msg00441.html

causes bootstrap to fail on i686-pc-mingw32 because MinGW lacks the non-C-
standard POSIX function ftruncate.  It does, however, have a function named 
_chsize prototyped in <io.h> with compatible parameters and similar semantics.

I'm submitting a bug report rather than a patch because I'm not exactly sure 
how what the most appropriate method of fixing this is.

Exact errors follow:

gcc -DHAVE_CONFIG_H -I. -I../../../src/cvs/head/gcc/fastjar -I.  -I. -
I../../../src/cvs/head/gcc/fastjar -
I../../../src/cvs/head/gcc/fastjar/../zlib -
I../../../src/cvs/head/gcc/fastjar/../include -DWITH_SHIFT_DOWN  -W -Wall -
pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -g -O2  -c -
o jar-jartool.o `test -f 'jartool.c' || 
echo '../../../src/cvs/head/gcc/fastjar/'`jartool.c
../../../src/cvs/head/gcc/fastjar/jartool.c: In function `main':
../../../src/cvs/head/gcc/fastjar/jartool.c:578: warning: implicit declaration 
of function 'ftruncate'
...
gcc -W -Wall -pedantic -Wstrict-prototypes -Wmissing-prototypes -Wwrite-
strings -g -O2    -o jar.exe  jar-jartool.o jar-dostime.o jar-compress.o jar-
pushback.o jar-shift.o ./../zlib/libz.a -L/../zlib//aaronwl/cs/env/mingw-head-
head-head/lib/gcc/i686-pc-mingw32/3.5.0 ../libiberty/libiberty.a 
jar-jartool.o(.text+0x38a4): In function `main':
c:/aaronwl/cs/compilers/gcc/build/mingw-
head/fastjar/../../../src/cvs/head/gcc/fastjar/jartool.c:578: undefined 
reference to `ftruncate'

-- 
           Summary: jartool.c uses ftruncate, nonexistant on mingw32
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aaronavay62 at aaronwl dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
  GCC host triplet: i686-pc-mingw32


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16472


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]