[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #13233 [Tor]: Drop c90 compiler support
#13233: Drop c90 compiler support
-----------------------------+--------------------------------
Reporter: Sebastian | Owner:
Type: defect | Status: closed
Priority: normal | Milestone: Tor: 0.2.6.x-final
Component: Tor | Version:
Resolution: implemented | Keywords: nickm-patch
Actual Points: | Parent ID:
Points: |
-----------------------------+--------------------------------
Comment (by NewEraCracker):
Hello,
Unfortunately C99 is not supported by Visual Studio 2010.
Is it possible for you to revert this?
For example, the following code from address.c in common dir will not
compile:
tor_assert(addr);
sa_family_t v_family = tor_addr_family(addr);
^ v_family needs to be declared before function call.
struct in_addr in_tmp = { .s_addr = 0 };
^ a c89 way to do this is to use { 0 } instead, it is equivalent to a
memset but shouldn't cause much problem here.
static char nil_bytes[16] = { [0]=0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0 };
^ there are 16 elements in that array, and 16 zeros declared, why using
[0]= ?
Regards,
NewEraCracker
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13233#comment:11>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs