ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/import_libevent
(Generate patch)

Comparing libev/import_libevent (file contents):
Revision 1.1 by root, Mon Nov 5 17:53:07 2007 UTC vs.
Revision 1.8 by root, Fri Nov 16 02:42:11 2007 UTC

1#!/bin/sh 1#!/bin/sh
2 2
3LE=../libevent-1.3e 3LE=../libevent-1.4.0-beta
4 4
5cp $LE/evdns.h . 5cp $LE/evdns.h .
6 6
7perl -ne ' 7perl -ne '
8 s/\s+char buf\[64\];/\tchar buf[96];/; 8 s/\s+char buf\[64\];/\tchar buf[96];/;
12 } 12 }
13 if (/#include "misc.h"/) { 13 if (/#include "misc.h"/) {
14 print "#ifndef EV_STANDALONE\n$_#endif\n"; 14 print "#ifndef EV_STANDALONE\n$_#endif\n";
15 next; 15 next;
16 } 16 }
17 if (/#include "(unistd.h|sys\/time.h)"/) {
18 print "#ifndef WIN32\n$_#endif\n";
19 next;
20 }
17 next if /#include "log.h"/; 21 next if /#include "log.h"/;
18 22
19 print; 23 print;
20' <$LE/evdns.c >evdns.c 24' <$LE/evdns.c >evdns.c
21 25
26cp $LE/autogen.sh .
22cp $LE/epoll_sub.c . 27cp $LE/epoll_sub.c .
23cp $LE/evbuffer.c . 28cp $LE/evbuffer.c .
24cp $LE/buffer.c . 29cp $LE/buffer.c .
25cp $LE/evhttp.h . 30cp $LE/evhttp.h .
31cp $LE/evutil.h .
32cp $LE/evutil.c .
33cp $LE/event-config.h .
34cp $LE/event-internal.h .
35cp $LE/evrpc.h .
36cp $LE/evrpc.c .
37cp $LE/evrpc-internal.h .
26cp $LE/http.c . 38cp $LE/http.c .
27cp $LE/event_tagging.c . 39cp $LE/event_tagging.c .
28cp $LE/http-internal.h . 40cp $LE/http-internal.h .
29cp $LE/strlcpy-internal.h . 41cp $LE/strlcpy-internal.h .
30cp $LE/log.c . 42cp $LE/log.c .
31cp $LE/log.h . 43cp $LE/log.h .
32cp $LE/strlcpy.c . 44cp $LE/strlcpy.c .
33rsync -a $LE/WIN32* $LE/sample $LE/test $LE/compat . --del 45rsync -a $LE/WIN32* $LE/sample $LE/test $LE/compat . --del
34rename 's/libevent/libev/' WIN32-Prj/lib* 46rename 's/libevent/libev/' WIN32-Prj/lib*
35cp $LE/aclocal.m4 . 47cp $LE/aclocal.m4 .
36cp $LE/acconfig.h . 48#cp $LE/acconfig.h .
37cp $LE/config.h.in . 49cp $LE/config.h.in .
38cp $LE/event_rpcgen.py . 50cp $LE/event_rpcgen.py .
39cp $LE/*.3 . 51cp $LE/*.3 .
40 52
41perl -i -pe 's/libevent/libev/g' sample/Makefile.am 53perl -i -pe 's/libevent/libev/g' sample/Makefile.am
45 57
46perl -i -ne ' 58perl -i -ne '
47 next if /"event-internal.h"/; 59 next if /"event-internal.h"/;
48 s/base\d?->sig.ev_signal_added/0/; 60 s/base\d?->sig.ev_signal_added/0/;
49 s/base\d?->sig.ev_signal_pair\[0\]/-1/; 61 s/base\d?->sig.ev_signal_pair\[0\]/-1/;
62 s/base->sig.evsignal_caught/0/;
50 next if /test_signal_(dealloc|pipeloss|switchbase)\(\)/; 63 next if /^\ttest_signal_(dealloc|pipeloss|switchbase|assert|restore)\(\)/;
64 next if /^\ttest_simplesignal\(\)/; # non-default-loop
65 next if /^\ttest_immediatesignal\(\)/; # non-default-loop
51 next if /test_priorities\(\d\)/; 66 next if /test_priorities\(\d\)/;
52 print; 67 print;
53' test/regress.c 68' test/regress.c
54 69
55perl -ne ' 70perl -ne '
71 s/\bmin_heap.h\b//g;
56 s/\bsignal.c\b//g; 72 s/\bsignal.c\b//g;
57 s/\bevport.c\b//g; 73 s/\bevport.c\b//g;
58 s/\bkqueue.c\b//g; 74 s/\bkqueue.c\b//g;
59 s/\bdevpoll.c\b//g; 75 s/\bdevpoll.c\b//g;
60 s/\brtsig.c\b//g; 76 s/\brtsig.c\b//g;
62 s/\bpoll.c\b//g; 78 s/\bpoll.c\b//g;
63 s/\bepoll.c\b//g; 79 s/\bepoll.c\b//g;
64 s/\bepoll_sub.c\b//g; 80 s/\bepoll_sub.c\b//g;
65 s/\bevent-internal.h\b//g; 81 s/\bevent-internal.h\b//g;
66 s/\bevsignal.h\b//g; 82 s/\bevsignal.h\b//g;
83 s/-Wall//;
84 s/^(man_MANS\s*=)/$1 ev.3 /;
67 s/^(EXTRA_DIST\s*=\s*)/$1 ev.h ev_vars.h ev_wrap.h event_compat.h ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c /; 85 s/^(EXTRA_DIST\s*=)/$1 ev.h ev_vars.h ev_wrap.h event_compat.h ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c ev.3 ev.pod ev.html /;
68 s/^(include_HEADERS\s*=\s*)/$1 ev.h event_compat.h /; 86 s/^(include_HEADERS\s*=)/$1 ev.h event_compat.h /;
69 s/^(libevent_la_SOURCES\s*=\s*)/$1 ev.c /; 87 s/^(CORE_SRC\s*=)/$1 ev.c /;
70 s/^(libevent_la_LIBADD\s*=\s*)/$1 -lm /; 88 s/^(SYS_LIBS\s*=)/$1 -lm /;
71 s/libevent/libev/g; 89 s/libevent/libev/g;
72 print; 90 print;
73' <$LE/Makefile.am >Makefile.am 91' <$LE/Makefile.am >Makefile.am
74 92
75perl -ne ' 93perl -ne '

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines