This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: errno bug
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Paluch Sebastian <pls at vp dot pl>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Sat, 01 Mar 2008 10:34:23 -0700
- Subject: Re: [ECOS] errno bug
- References: <op.t7cgusnbjnshjj@pls.home> <47C97D83.7020707@mlbassoc.com> <op.t7ck7x1gjnshjj@pls.home>
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