Menu

#116 c99 feature in test/regress.c

feature
open
nobody
None
5
2014-01-15
2014-01-15
Gisle Vanem
No

The test/regress.c file uses the C99 feature of data-statements after code. This doesn't work with MSVC v16 (Visual C 2010 Express). A patch:

diff --git a/test/regress.c b/test/regress.c
index e288d46..4d17b67 100644
--- a/test/regress.c
+++ b/test/regress.c
@@ -1938,9 +1938,10 @@ re_add_read_cb(evutil_socket_t fd, short event, void *arg)
 {
        char buf[256];
        struct event *ev_other = arg;
-       readd_test_event_last_added = ev_other;
        ev_ssize_t n_read;

+       readd_test_event_last_added = ev_other;
+
        n_read = read(fd, buf, sizeof(buf));

        if (n_read < 0) {

Also, Win32-Code/getopt.[ch] should IMHO be added for MSVC.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.