Ticket #21530: patch_setup_h
File patch_setup_h, 460 bytes (added by Veence (Vincent), 15 years ago) |
---|
Line | |
---|---|
1 | #!/bin/sh |
2 | |
3 | echo Patching $1 |
4 | |
5 | cat $1 | \ |
6 | sed 's/#define *SIZEOF_VOID_P .*/\ |
7 | #ifdef __LP64__\ |
8 | #define SIZEOF_VOID_P 8\ |
9 | #else\ |
10 | #define SIZEOF_VOID_P 4\ |
11 | #endif/' |\ |
12 | sed 's/#define *SIZEOF_LONG .*/\ |
13 | #ifdef __LP64__\ |
14 | #define SIZEOF_LONG 8\ |
15 | #else\ |
16 | #define SIZEOF_LONG 4\ |
17 | #endif/' |\ |
18 | sed 's/#define *SIZEOF_SIZE_T .*/\ |
19 | #ifdef __LP64__\ |
20 | #define SIZEOF_SIZE_T 8\ |
21 | #else\ |
22 | #define SIZEOF_SIZE_T 4\ |
23 | #endif/' > /private/tmp/$$.tmp |
24 | rm $1 |
25 | mv /private/tmp/$$.tmp $1 |