This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos 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]

Re: errno bug


Please keep your replies on the mailing list so that all may benefit.
Private email support is only for those with support contracts.

Paluch Sebastian wrote:
Dnia Sat, 01 Mar 2008 17:00:03 +0100, Gary Thomas <gary@mlbassoc.com> napisał:

Paluch Sebastian wrote:
Hi, I get folowing error while trying to use stdio.h
In file included from D:/SAM7/ecos/system_small_install/include/cyg/libc/stdio/s
tdio.inl:66,
from D:/SAM7/ecos/system_small_install/include/cyg/libc/stdio/s
tdio.h:330,
from D:/SAM7/ecos/system_small_install/include/stdio.h:81,
from src/main.c:22:
D:/SAM7/ecos/system_small_install/include/errno.h:71:34: cyg/error/(*cyg_error_g
et_errno_p()).h: No such file or directory
make: *** [bin/main.o] Error 1

How did you configure eCos?


It was standard configuration. I have found that including <cyg/error/errno.h> first and than <stdio.h> is causing problem.

a. there's no such thing as a "standard" eCos configuration. Do you mean the default (template)? or what? b. if you want to include stdio and friends, don't include the eCos internal file (<cyg/error/errno.h>). If the code needs that file, it will include it automatically.


A macro definition of errno in <cyg/error/errno.h> file


#ifdef CYGSEM_ERROR_PER_THREAD_ERRNO
# define errno (*cyg_error_get_errno_p())  /* Per-thread error status */
#else
extern Cyg_ErrNo errno;                /* Global error status */
#endif /* ifdef CYGSEM_ERROR_PER_THREAD_ERRNO */

is inserted in a file name which needs to be included in <errno.h>

#if CYGINT_ISO_ERRNO
# include CYGBLD_ISO_ERRNO_HEADER
#endif

the CYGBLD_ISO_ERRNO_HEADER is <cyg/error/errno.h>. So errno is replaced by (*cyg_error_get_errno_p()).


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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