]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/mach/hurd/i386/bits/sigcontext.h
Update copyright notices with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / mach / hurd / i386 / bits / sigcontext.h
index b742326bdbc3681e34657f1ecbee5983a74ba565..c51a94ef1a12d4ca2028f9ab14f1a049c0844e5b 100644 (file)
@@ -1,21 +1,26 @@
 /* Machine-dependent signal context structure for GNU Hurd.  i386 version.
-Copyright (C) 1991, 1992, 1994 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
+   Copyright (C) 1991-2014 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
 
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
 
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Library General Public License for more details.
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
 
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 675 Mass Ave,
-Cambridge, MA 02139, USA.  */
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+#ifndef sc_pc
 
 /* Signal handlers are actually called:
    void handler (int sig, int code, struct sigcontext *scp);  */
@@ -42,8 +47,8 @@ struct sigcontext
     /* All following members are machine-dependent.  The rest of this
        structure is written to be laid out identically to:
        {
-         struct i386_thread_state basic;
-         struct i386_float_state fpu;
+        struct i386_thread_state basic;
+        struct i386_float_state fpu;
        }
        trampoline.c knows this, so it must be changed if this changes.  */
 
@@ -53,7 +58,7 @@ struct sigcontext
     int sc_fs;
     int sc_es;
     int sc_ds;
-  
+
     /* "General" registers.  These members are in the order that the i386
        `pusha' and `popa' instructions use (`popa' ignores %esp).  */
     int sc_edi;
@@ -64,10 +69,10 @@ struct sigcontext
     int sc_edx;
     int sc_ecx;
     int sc_eax;
-  
+
     int sc_eip;                        /* Instruction pointer.  */
     int sc_cs;                 /* Code segment register.  */
-  
+
     int sc_efl;                        /* Processor flags.  */
 
     int sc_uesp;               /* This stack pointer is used.  */
@@ -83,6 +88,12 @@ struct sigcontext
     int sc_fpexcsr;            /* FPSR including exception bits.  */
   };
 
+/* Traditional BSD names for some members.  */
+#define sc_sp  sc_uesp         /* Stack pointer.  */
+#define sc_fp  sc_ebp          /* Frame pointer.  */
+#define sc_pc  sc_eip          /* Process counter.  */
+#define sc_ps  sc_efl
+
 
 /* Codes for SIGFPE.  */
 #define FPE_INTOVF_TRAP                0x1 /* integer overflow */
@@ -104,3 +115,5 @@ struct sigcontext
 /* Codes for SIGTRAP.  */
 #define DBG_SINGLE_TRAP                0x1 /* single step */
 #define DBG_BRKPNT_FAULT       0x2 /* breakpoint instruction */
+
+#endif /* sc_pc */