3 # Copyright (c) 2005 Junio C Hamano
6 test_description='git-apply should not get confused with rename/copy.
14 mkdir -p klibc/arch/x86_64/include/klibc
16 cat >klibc/arch/x86_64/include/klibc/archsetjmp.h <<\EOF
18 * arch/x86_64/include/klibc/archsetjmp.h
21 #ifndef _KLIBC_ARCHSETJMP_H
22 #define _KLIBC_ARCHSETJMP_H
35 typedef struct __jmp_buf jmp_buf[1];
37 #endif /* _SETJMP_H */
41 diff --git a/klibc/arch/x86_64/include/klibc/archsetjmp.h b/include/arch/cris/klibc/archsetjmp.h
43 copy from klibc/arch/x86_64/include/klibc/archsetjmp.h
44 copy to include/arch/cris/klibc/archsetjmp.h
45 --- a/klibc/arch/x86_64/include/klibc/archsetjmp.h
46 +++ b/include/arch/cris/klibc/archsetjmp.h
49 - * arch/x86_64/include/klibc/archsetjmp.h
50 + * arch/cris/include/klibc/archsetjmp.h
53 #ifndef _KLIBC_ARCHSETJMP_H
54 #define _KLIBC_ARCHSETJMP_H
57 - unsigned long __rbx;
58 - unsigned long __rsp;
59 - unsigned long __rbp;
60 - unsigned long __r12;
61 - unsigned long __r13;
62 - unsigned long __r14;
63 - unsigned long __r15;
64 - unsigned long __rip;
75 + unsigned long __srp;
78 typedef struct __jmp_buf jmp_buf[1];
80 -#endif /* _SETJMP_H */
81 +#endif /* _KLIBC_ARCHSETJMP_H */
82 diff --git a/klibc/arch/x86_64/include/klibc/archsetjmp.h b/include/arch/m32r/klibc/archsetjmp.h
84 rename from klibc/arch/x86_64/include/klibc/archsetjmp.h
85 rename to include/arch/m32r/klibc/archsetjmp.h
86 --- a/klibc/arch/x86_64/include/klibc/archsetjmp.h
87 +++ b/include/arch/m32r/klibc/archsetjmp.h
90 - * arch/x86_64/include/klibc/archsetjmp.h
91 + * arch/m32r/include/klibc/archsetjmp.h
94 #ifndef _KLIBC_ARCHSETJMP_H
95 #define _KLIBC_ARCHSETJMP_H
98 - unsigned long __rbx;
99 - unsigned long __rsp;
100 - unsigned long __rbp;
101 + unsigned long __r8;
102 + unsigned long __r9;
103 + unsigned long __r10;
104 + unsigned long __r11;
109 - unsigned long __rip;
112 typedef struct __jmp_buf jmp_buf[1];
114 -#endif /* _SETJMP_H */
115 +#endif /* _KLIBC_ARCHSETJMP_H */
118 find klibc -type f -print | xargs git-update-index --add --
120 test_expect_success 'check rename/copy patch' 'git-apply --check patch'
122 test_expect_success 'apply rename/copy patch' 'git-apply --index patch'