Quoting Jonathan Nieder:
: Raphael Manfredi wrote:
: 
: > The packaged <ucontext.h> file does a:
: >
: >     #include <sys/ucontext.h>
: >
: > but that file is missing from the package, hence the <ucontext.h> header
: > cannot be included in programs.
: 
:  $ dpkg-query -S /usr/include/i386-linux-gnu/sys/ucontext.h 
:  libc6-dev: /usr/include/i386-linux-gnu/sys/ucontext.h
:  $ dpkg-query -W libc6-dev
:  libc6-dev    2.13-27
: 
: What actual error message are you getting from your compiler, and with
: what command line?

I'm building a metaconfig test for ucontext.h, and I am currently attempting
to compile this simple stupid program to see whether <ucontext.h> is
usable and how to grab the PC from the context:

        #include <ucontext.h>

        main()
        {
                ucontext_t *u;
                return u->uc_mcontext.gregs[REG_EIP];
        }

When compiling with:

        cc -o test test.c

I was getting:

        error: 'REG_EIP' undeclared (first use in this function)

When I started to look at <ucontext.h> I saw an inclusion of <sys/ucontext.h>
and I forgot about the hidden gcc magic of looking for the file into
/usr/include/i386-linux-gnu.

Sorry, I should have done a

        cc -E test.c

to understand my mistake.

Raphael



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to