1--- tg/Makefile 2016-07-24 18:04:11.022621500 +0200 2+++ tg-cygwin/Makefile 2016-07-24 22:55:32.710938800 +0200 3@@ -4,9 +4,9 @@ 4 LDFLAGS= -L/usr/local/lib -L/usr/lib -L/usr/lib 5 CPPFLAGS= -I/usr/local/include -I/usr/include -I/usr/include 6 DEFS=-DHAVE_CONFIG_H 7-COMPILE_FLAGS=${CFLAGS} ${CPFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC 8+COMPILE_FLAGS=${CFLAGS} ${CPFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter 9 EXTRA_LIBS=-ljansson -lconfig -lz -levent -lreadline -llua-5.2 -lssl -lcrypto 10-LOCAL_LDFLAGS=-rdynamic -ggdb -levent ${EXTRA_LIBS} -ldl -lpthread -lutil 11+LOCAL_LDFLAGS=-ggdb -levent ${EXTRA_LIBS} -ldl -lpthread -lutil 12 LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS} 13 14 DEP=dep 15--- tg\loop.c Sun Jul 24 15:30:11 2016 16+++ tg-cygwin\loop.c Sat Jul 23 17:51:49 2016 17@@ -489,8 +489,9 @@ 18 close (auth_file_fd); 19 } 20 21-void write_secret_chat (tgl_peer_t *Peer, void *extra) { 22- struct tgl_secret_chat *P = (void *)Peer; 23+// In Cygwin's Python, _P is marco constant. So change tgl_peer_t *_P -> tgl_peer_t *_Peer 24+void write_secret_chat (tgl_peer_t *_Peer, void *extra) { 25+ struct tgl_secret_chat *P = (void *)_Peer; 26 if (tgl_get_peer_type (P->id) != TGL_PEER_ENCR_CHAT) { return; } 27 if (P->state != sc_ok) { return; } 28 int *a = extra; 29@@ -737,7 +738,8 @@ 30 vlogprintf (E_WARNING, "Accepting incoming connection\n"); 31 socklen_t clilen = 0; 32 struct sockaddr_in cli_addr; 33- int fd = accept (efd, (struct sockaddr *)&cli_addr, &clilen); 34+ // In Cygwin, put unsigned int in socklen_t produce warning. Add (socklen_t *) casting 35+ int fd = accept (efd, (struct sockaddr *)&cli_addr, (socklen_t *)&clilen); 36 37 assert (fd >= 0); 38 struct bufferevent *bev = bufferevent_socket_new (TLS->ev_base, fd, 0); 39