#include <windows.h>
#include "strptime.h"
+typedef int socklen_t;
#else
#ifdef USE_POLL
#ifdef __PPU__
SOCKADDR addr;
};
-#if defined(__MINGW32__) || defined(_MSC_VER)
-unsigned int WINAPI tw_server_pass(void* ptr) {
-#elif defined(__BORLANDC__)
+#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
+#define NO_RETURN_THREAD
void tw_server_pass(void* ptr) {
#elif defined(__HAIKU__)
int32_t tw_server_pass(void* ptr) {
int port = ((struct pass_entry*)ptr)->port;
SOCKADDR addr = ((struct pass_entry*)ptr)->addr;
#else
+#define NO_RETURN_THREAD
void tw_server_pass(int sock, bool ssl, int port, SOCKADDR addr) {
#endif
SSL* s = NULL;
path = cm_strcat(vhost_entry->root == NULL ? "" : vhost_entry->root, req.path);
cm_log("Server", "Filesystem path is %s", path);
#if defined(_MSC_VER) || defined(__BORLANDC__)
- for(i = strlen(path) - 1; i >= 0; i--){
- if(path[i] == '/'){
+ for(i = strlen(path) - 1; i >= 0; i--) {
+ if(path[i] == '/') {
path[i] = 0;
- }else{
+ } else {
break;
}
}
#endif
close_socket(sock);
#if defined(__MINGW32__) || defined(_MSC_VER) || defined(__BORLANDC__)
- _endthread(
-#ifndef __BORLANDC__
- 0
-#endif
- );
+ _endthread();
#elif defined(__HAIKU__)
exit_thread(0);
#endif
-#ifndef __BORLANDC__
+#ifndef NO_RETURN_THREAD
return 0;
#endif
}
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
-typedef int socklen_t;
#define INT32_MAX 0x7fffffff