[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] libevent-2.0.18-stable.tar.gz can not build on win32



add code "#define int mode_t",but ... :

C:\Documents and Settings\qs\My Documents\Downloads\Compressed\libevent-2.0.18-s
table>nmake /f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

        cl /IWIN32-Code /Iinclude /Icompat /DWIN32 /DHAVE_CONFIG_H /I. /Ox /W3 /
wd4996 /nologo /c event.c buffer.c bufferevent.c bufferevent_sock.c bufferevent_
pair.c listener.c evmap.c log.c evutil.c strlcpy.c signal.c bufferevent_filter.c
 evthread.c bufferevent_ratelim.c evutil_rand.c win32select.c evthread_win32.c b
uffer_iocp.c event_iocp.c bufferevent_async.c
event.c
buffer.c
bufferevent.c
bufferevent_sock.c
bufferevent_pair.c
listener.c
evmap.c
log.c
evutil.c
evutil.c(92) : error C2061: syntax error : identifier 'evutil_open_closeonexec'
evutil.c(92) : error C2059: syntax error : ';'
evutil.c(92) : error C2059: syntax error : 'type'
evutil.c(126) : error C2061: syntax error : identifier 'evutil_read_file'
evutil.c(126) : error C2059: syntax error : ';'
evutil.c(126) : error C2059: syntax error : 'type'
evutil.c(183) : error C2061: syntax error : identifier 'evutil_socketpair'
evutil.c(183) : error C2059: syntax error : ';'
evutil.c(183) : error C2146: syntax error : missing ')' before identifier 'famil
y'
evutil.c(183) : error C2061: syntax error : identifier 'family'
evutil.c(183) : error C2059: syntax error : ','
evutil.c(183) : error C2059: syntax error : ')'
evutil.c(193) : error C2061: syntax error : identifier 'evutil_ersatz_socketpair
'
evutil.c(193) : error C2059: syntax error : ';'
evutil.c(193) : error C2146: syntax error : missing ')' before identifier 'famil
y'
evutil.c(193) : error C2061: syntax error : identifier 'family'
evutil.c(193) : error C2059: syntax error : ','
evutil.c(194) : error C2059: syntax error : ')'
evutil.c(295) : error C2061: syntax error : identifier 'evutil_make_socket_nonbl
ocking'
evutil.c(295) : error C2059: syntax error : ';'
evutil.c(295) : error C2059: syntax error : 'type'
evutil.c(322) : error C2061: syntax error : identifier 'evutil_make_listen_socke
t_reuseable'
evutil.c(322) : error C2059: syntax error : ';'
evutil.c(322) : error C2059: syntax error : 'type'
evutil.c(337) : error C2061: syntax error : identifier 'evutil_make_socket_close
onexec'
evutil.c(337) : error C2059: syntax error : ';'
evutil.c(337) : error C2059: syntax error : 'type'
evutil.c(354) : error C2061: syntax error : identifier 'evutil_closesocket'
evutil.c(354) : error C2059: syntax error : ';'
evutil.c(354) : error C2059: syntax error : 'type'
evutil.c(364) : error C2146: syntax error : missing ')' before identifier 'base'

evutil.c(364) : error C2081: 'mode_t' : name in formal parameter list illegal
evutil.c(364) : error C2061: syntax error : identifier 'base'
evutil.c(364) : error C2059: syntax error : ';'
evutil.c(364) : error C2059: syntax error : ')'
evutil.c(365) : error C2449: found '{' at file scope (missing function header?)
evutil.c(421) : error C2059: syntax error : '}'
evutil.c(449) : error C2061: syntax error : identifier 'evutil_socket_geterror'
evutil.c(449) : error C2059: syntax error : ';'
evutil.c(449) : error C2059: syntax error : 'type'
evutil.c(467) : error C2061: syntax error : identifier 'evutil_socket_connect'
evutil.c(467) : error C2059: syntax error : ';'
evutil.c(467) : error C2059: syntax error : 'type'
evutil.c(504) : error C2061: syntax error : identifier 'evutil_socket_finished_c
onnecting'
evutil.c(504) : error C2059: syntax error : ';'
evutil.c(504) : error C2059: syntax error : 'type'
evutil.c(536) : error C2061: syntax error : identifier 'have_checked_interfaces'

evutil.c(536) : error C2059: syntax error : ';'
evutil.c(536) : error C2059: syntax error : ','
evutil.c(550) : error C2061: syntax error : identifier 'evutil_check_interfaces'

evutil.c(550) : error C2059: syntax error : ';'
evutil.c(550) : error C2146: syntax error : missing ')' before identifier 'force
_recheck'
evutil.c(550) : error C2061: syntax error : identifier 'force_recheck'
evutil.c(550) : error C2059: syntax error : ')'
evutil.c(551) : error C2449: found '{' at file scope (missing function header?)
evutil.c(633) : error C2059: syntax error : '}'
evutil.c(705) : error C2061: syntax error : identifier 'parse_numeric_servname'
evutil.c(705) : error C2059: syntax error : ';'
evutil.c(705) : error C2059: syntax error : 'type'
evutil.c(720) : error C2061: syntax error : identifier 'evutil_parse_servname'
evutil.c(720) : error C2059: syntax error : ';'
evutil.c(720) : error C2059: syntax error : 'type'
evutil.c(740) : error C2146: syntax error : missing ')' before identifier 'proto
'
evutil.c(740) : error C2061: syntax error : identifier 'proto'
evutil.c(740) : error C2059: syntax error : ';'
evutil.c(740) : error C2059: syntax error : ')'
evutil.c(741) : error C2449: found '{' at file scope (missing function header?)
evutil.c(763) : error C2059: syntax error : '}'
evutil.c(806) : error C2061: syntax error : identifier 'evutil_getaddrinfo_commo
n'
evutil.c(806) : error C2059: syntax error : ';'
evutil.c(806) : error C2059: syntax error : 'type'
evutil.c(929) : error C2061: syntax error : identifier 'ALL_NONNATIVE_AI_FLAGS'
evutil.c(929) : error C2059: syntax error : ';'
evutil.c(929) : error C2513: '/*global*/ ' : no variable declared before '='
evutil.c(953) : error C2061: syntax error : identifier 'ALL_NATIVE_AI_FLAGS'
evutil.c(953) : error C2059: syntax error : ';'
evutil.c(953) : error C2513: '/*global*/ ' : no variable declared before '='
evutil.c(1052) : error C2065: 'have_checked_interfaces' : undeclared identifier
evutil.c(1053) : warning C4013: 'evutil_check_interfaces' undefined; assuming ex
tern returning int
evutil.c(1054) : error C2065: 'had_ipv4_address' : undeclared identifier
evutil.c(1054) : error C2065: 'had_ipv6_address' : undeclared identifier
evutil.c(1062) : error C2061: syntax error : identifier 'need_numeric_port_hack_
'
evutil.c(1062) : error C2059: syntax error : ';'
evutil.c(1062) : error C2513: '/*global*/ ' : no variable declared before '='
evutil.c(1063) : error C2061: syntax error : identifier 'need_socktype_protocol_
hack_'
evutil.c(1063) : error C2059: syntax error : ';'
evutil.c(1063) : error C2513: '/*global*/ ' : no variable declared before '='
evutil.c(1064) : error C2061: syntax error : identifier 'tested_for_getaddrinfo_
hacks'
evutil.c(1064) : error C2059: syntax error : ';'
evutil.c(1064) : error C2513: '/*global*/ ' : no variable declared before '='
evutil.c(1088) : error C2065: 'mode_t' : undeclared identifier
evutil.c(1088) : error C2146: syntax error : missing ';' before identifier 'r'
evutil.c(1088) : error C2065: 'r' : undeclared identifier
evutil.c(1088) : error C2065: 'r2' : undeclared identifier
evutil.c(1089) : error C2143: syntax error : missing ';' before 'type'
evutil.c(1090) : error C2143: syntax error : missing ';' before 'type'
evutil.c(1092) : error C2065: 'hints' : undeclared identifier
evutil.c(1093) : error C2224: left of '.ai_family' must have struct/union type
evutil.c(1094) : error C2224: left of '.ai_flags' must have struct/union type
evutil.c(1102) : warning C4133: 'function' : incompatible types - from 'int *' t
o 'const addrinfo *'
evutil.c(1102) : error C2065: 'ai' : undeclared identifier
evutil.c(1102) : warning C4047: 'function' : 'addrinfo **' differs in levels of
indirection from 'int *'
evutil.c(1102) : warning C4024: 'WspiapiGetAddrInfo' : different types for forma
l and actual parameter 4
evutil.c(1103) : error C2224: left of '.ai_socktype' must have struct/union type

evutil.c(1104) : warning C4133: 'function' : incompatible types - from 'int *' t
o 'const addrinfo *'
evutil.c(1104) : error C2065: 'ai2' : undeclared identifier
evutil.c(1104) : fatal error C1003: error count exceeds 100; stopping compilatio
n
strlcpy.c
signal.c
bufferevent_filter.c
evthread.c
bufferevent_ratelim.c
evutil_rand.c
win32select.c
evthread_win32.c
buffer_iocp.c
event_iocp.c
bufferevent_async.c
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
l.EXE"' : return code '0x2'
Stop.

C:\Documents and Settings\qs\My Documents\Downloads\Compressed\libevent-2.0.18-s
table>

在 2012年3月28日 下午11:36,Nick Mathewson <nickm@xxxxxxxxxxxxx> 写道:
> 2012/3/28 Sebastian Hahn <libevent-users@xxxxxxxxxxxxxxxxx>:
>>
>> On Mar 28, 2012, at 4:41 PM, Savg He wrote:
>>
>>> My build environment: win xp of sp3 + visual c + + 2005 command line:
>>>
>>>
>>> C:\Documents and Settings\qs\My Documents\Downloads\Compressed\libevent-2.0.18-s
>>> table>nmake /f Makefile.nmake
>>
>> Can you see if this patch fixes the problem for you?
>>
>> diff --git a/evutil.c b/evutil.c
>> index 4fa3754..f3a2ed6 100644
>> --- a/evutil.c
>> +++ b/evutil.c
>> @@ -97,6 +97,7 @@
>>  #define close _close
>>  #define fstat _fstati64
>>  #define stat _stati64
>> +#define int mode_t
>>  #endif
>>
>>  int
>
> Surely that's reversed; did you mean "#define mode_t int" ?
> ***********************************************************************
> To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
> unsubscribe libevent-users    in the body.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.