dlls/ntdll/signal_i386.c changes break FreeBSD

Gerald Pfeifer gerald at pfeifer.com
Thu Jul 24 17:05:00 CDT 2014


Over the last 24 hours, signal_i386.c stopped building on FreeBSD/i386 
10.0 as follows:

+signal_i386.c:283:40: error: 'ucontext_t' has no member named 'sc_trapno'
+signal_i386.c:284:40: error: 'ucontext_t' has no member named 'sc_err'
+signal_i386.c:279:40: error: 'ucontext_t' has no member named 'sc_fs'
+signal_i386.c:280:40: error: 'ucontext_t' has no member named 'sc_gs'
+signal_i386.c:276:40: error: 'ucontext_t' has no member named 'sc_cs'
+signal_i386.c:281:40: error: 'ucontext_t' has no member named 'sc_ss'
+signal_i386.c:288:40: error: 'ucontext_t' has no member named 'sc_esp'
+signal_i386.c:268:40: error: 'ucontext_t' has no member named 'sc_eax'
+signal_i386.c:269:40: error: 'ucontext_t' has no member named 'sc_ebx'
+signal_i386.c:270:40: error: 'ucontext_t' has no member named 'sc_ecx'
+signal_i386.c:271:40: error: 'ucontext_t' has no member named 'sc_edx'
+signal_i386.c:272:40: error: 'ucontext_t' has no member named 'sc_esi'
+signal_i386.c:273:40: error: 'ucontext_t' has no member named 'sc_edi'
:
+signal_i386.c:997:1: warning: control reaches end of non-void function [-Wreturn-type]
+signal_i386.c:566:1: warning: control reaches end of non-void function [-Wreturn-type]
+signal_i386.c:580:1: warning: control reaches end of non-void function [-Wreturn-type]


On FreeBSD, /usr/include/sys/ucontext.h has the following:

  typedef struct __ucontext {
        /*
         * Keep the order of the first two fields. Also,
         * keep them the first two fields in the structure.
         * This way we can have a union with struct
         * sigcontext and ucontext_t. This allows us to
         * support them both at the same time.
         * note: the union is not defined, though.
         */
        sigset_t        uc_sigmask;
        mcontext_t      uc_mcontext;

        struct __ucontext *uc_link;
        stack_t         uc_stack;
        int             uc_flags;
  #define UCF_SWAPPED     0x00000001      /* Used by swapcontext(3). */
        int             __spare__[4];
  } ucontext_t;

mcontext_t is defined in /usr/include/x86/ucontext as follows:

  typedef struct __mcontext {
        /*
         * The definition of mcontext_t must match the layout of
         * struct sigcontext after the sc_mask member.  This is so
         * that we can support sigcontext and ucontext_t at the same
         * time.
         */
        __register_t    mc_onstack;     /* XXX - sigcontext compat. */
        __register_t    mc_gs;          /* machine state (struct 
  trapframe) */
        __register_t    mc_fs;
        __register_t    mc_es;
        __register_t    mc_ds;
        __register_t    mc_edi;
        __register_t    mc_esi;
        __register_t    mc_ebp;
        __register_t    mc_isp;
        __register_t    mc_ebx;
        __register_t    mc_edx;
        __register_t    mc_ecx;
        __register_t    mc_eax;
        __register_t    mc_trapno;
        __register_t    mc_err;
        __register_t    mc_eip;
        __register_t    mc_cs;
        __register_t    mc_eflags;
        __register_t    mc_esp;
        __register_t    mc_ss;
   :

Gerald



More information about the wine-devel mailing list