source: autobuild/scripts/fixsource @ 905

Last change on this file since 905 was 905, checked in by moo, 2 years ago

import auto build scripts

  • Property svn:executable set to *
File size: 738 bytes
Line 
1#!/bin/sh
2
3. scripts/common
4
5[[ $# -lt 1 ]] && die "Usage: $0 <path/to/phpsource>"
6
7src="$1"
8
9f="$src/ext/date/lib/timelib_structs.h"
10if [[ -f $f ]]; then
11    sed -i 's/<timelib_config.h>/"timelib_config.h"/' "$f"
12
13    f="$src/ext/date/lib/timelib_config.h"
14    if [[ ! -f $f ]]; then
15        cat > "$f" <<EOF
16#ifdef PHP_WIN32
17# include "config.w32.h"
18#else
19# include <php_config.h>
20#endif
21EOF
22    fi
23    echo "Added ext/date/lib/timelib_config.h"
24fi
25
26f="$src/main/snprintf.h"
27if [[ -f $f ]]; then
28    sed -i 's/#if SIZEOF_LONG_LONG_INT/#ifdef PHP_WIN32\n# define WIDE_INT       __int64\n#elif SIZEOF_LONG_LONG_INT/' "$f"
29fi
30
31f="$src/win32/build/config.w32.h.in"
32sed -i 's/^#define HAVE_SOCKLEN_T 1$/#if defined(_MSC_VER) \&\& _MSC_VER > 1299\n\0\n#endif/' "$f"
Note: See TracBrowser for help on using the repository browser.