warning: _close is not implemented and will always fail?

This is a discussion on warning: _close is not implemented and will always fail? within the C Programming forums, part of the General Programming Boards category; Trying to compile a program and am getting the following output: Code: /opt/m68k/m68k-elf/lib/libc.a(closer.o): In function `_close_r': ../../../../../newlib-1.14.0/newlib/libc/reent/closer.c:53: warning: _close is ...

  1. #1
    Registered User TheEngineer's Avatar
    Join Date
    Aug 2009
    Posts
    50

    warning: _close is not implemented and will always fail?

    Trying to compile a program and am getting the following output:


    Code:
    /opt/m68k/m68k-elf/lib/libc.a(closer.o): In function `_close_r':
    ../../../../../newlib-1.14.0/newlib/libc/reent/closer.c:53: warning: _close is not implemented and will always fail
    /opt/m68k/m68k-elf/lib/libc.a(fstatr.o): In function `_fstat_r':
    ../../../../../newlib-1.14.0/newlib/libc/reent/fstatr.c:62: warning: _fstat is not implemented and will always fail
    /opt/m68k/m68k-elf/lib/libc.a(makebuf.o): In function `__smakebuf':
    ../../../../../newlib-1.14.0/newlib/libc/stdio/makebuf.c:96: warning: isatty is not implemented and will always fail
    /opt/m68k/m68k-elf/lib/libc.a(lseekr.o): In function `_lseek_r':
    ../../../../../newlib-1.14.0/newlib/libc/reent/lseekr.c:58: warning: _lseek is not implemented and will always fail
    /opt/m68k/m68k-elf/lib/libc.a(openr.o): In function `_open_r':
    ../../../../../newlib-1.14.0/newlib/libc/reent/openr.c:59: warning: _open is not implemented and will always fail
    /opt/m68k/m68k-elf/lib/libc.a(readr.o): In function `_read_r':
    ../../../../../newlib-1.14.0/newlib/libc/reent/readr.c:58: warning: _read is not implemented and will always fail
    /opt/m68k/m68k-elf/lib/libc.a(writer.o): In function `_write_r':
    ../../../../../newlib-1.14.0/newlib/libc/reent/writer.c:58: warning: _write is not implemented and will always fail

    My command is this:

    Code:
    make[1]: Entering directory `/cygdrive/c/build'
    m68k-elf-ld -M -cref -Mex Mex.Mex -T ../Mex.ld -L`m68k-elf-gcc -m68000 --print-libgcc | sed -e "s/libgcc.a//g"`  -o Map  MexMain.o file1.o file2.o file3.o file4.o file5.o file6.o file7.o file8.o file9.o -lgcc -lc -lnosys -lg

    Anyone have any idea how to get rid of the warnings?
    Last edited by TheEngineer; 08-18-2009 at 11:27 AM. Reason: formatting

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    It sounds like the functions aren't implemented, so the only way would be to switch compiler or not use the functions.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Maz
    Maz is offline
    Registered User Maz's Avatar
    Join Date
    Nov 2005
    Location
    Finland
    Posts
    194
    Or looks like you miss some library.

  4. #4
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    You could try renaming those functions to their proper names (i.e. without the leading underscore). Only VC++ annoys people by putting superfluous underscores where they don't belong.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  5. #5
    Registered User TheEngineer's Avatar
    Join Date
    Aug 2009
    Posts
    50
    Thanks, I'll try

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21