1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 21:21:06 +00:00
nixpkgs/pkgs/os-specific/linux/dietlibc/pc.patch
Eelco Dolstra c696045af0 * dietlibc: copy sys/user.h from Glibc, binutils needs it.
* dietlibc: rename the PC macro to __DIETLIBC_PC to prevent name
  clashes.

svn path=/nixpkgs/trunk/; revision=6769
2006-10-19 10:54:40 +00:00

79 lines
2.3 KiB
Diff

diff -rc dietlibc-0.30-orig/include/asm/arm-sigcontext.h dietlibc-0.30/include/asm/arm-sigcontext.h
*** dietlibc-0.30-orig/include/asm/arm-sigcontext.h 2002-05-09 03:05:10.000000000 +0200
--- dietlibc-0.30/include/asm/arm-sigcontext.h 2006-10-19 12:40:30.000000000 +0200
***************
*** 1,5 ****
! #define PC(ctx) (ctx.arm_pc)
/*
* Signal context structure - contains all info to do with the state
--- 1,5 ----
! #define __DIETLIBC_PC(ctx) (ctx.arm_pc)
/*
* Signal context structure - contains all info to do with the state
diff -rc dietlibc-0.30-orig/include/asm/i386-sigcontext.h dietlibc-0.30/include/asm/i386-sigcontext.h
*** dietlibc-0.30-orig/include/asm/i386-sigcontext.h 2005-09-21 09:33:08.000000000 +0200
--- dietlibc-0.30/include/asm/i386-sigcontext.h 2006-10-19 12:40:41.000000000 +0200
***************
*** 38,44 ****
};
#define X86_FXSR_MAGIC 0x0000
! #define PC(ctx) (ctx.eip)
struct sigcontext {
__u16 gs, __gsh;
--- 38,44 ----
};
#define X86_FXSR_MAGIC 0x0000
! #define __DIETLIBC_PC(ctx) (ctx.eip)
struct sigcontext {
__u16 gs, __gsh;
diff -rc dietlibc-0.30-orig/include/asm/ia64-sigcontext.h dietlibc-0.30/include/asm/ia64-sigcontext.h
*** dietlibc-0.30-orig/include/asm/ia64-sigcontext.h 2002-07-20 18:47:48.000000000 +0200
--- dietlibc-0.30/include/asm/ia64-sigcontext.h 2006-10-19 12:39:40.000000000 +0200
***************
*** 1,6 ****
#include <sys/ptrace.h>
! #define PC(ctx) (ctx.sc_ip)
struct sigcontext {
unsigned long sc_flags;
--- 1,6 ----
#include <sys/ptrace.h>
! #define __DIETLIBC_PC(ctx) (ctx.sc_ip)
struct sigcontext {
unsigned long sc_flags;
diff -rc dietlibc-0.30-orig/profiling/profil.c dietlibc-0.30/profiling/profil.c
*** dietlibc-0.30-orig/profiling/profil.c 2002-04-08 00:13:53.000000000 +0200
--- dietlibc-0.30/profiling/profil.c 2006-10-19 12:40:58.000000000 +0200
***************
*** 43,51 ****
static void
profiler (int signal, struct sigcontext ctx)
{
! size_t s = PC(ctx)-low_pc;
(void)signal;
! if ((PC(ctx)) < low_pc) return;
s >>= 1;
if (s < maxhits)
++buffer[s];
--- 43,51 ----
static void
profiler (int signal, struct sigcontext ctx)
{
! size_t s = __DIETLIBC_PC(ctx)-low_pc;
(void)signal;
! if ((__DIETLIBC_PC(ctx)) < low_pc) return;
s >>= 1;
if (s < maxhits)
++buffer[s];