Re: config.w32.h is missing when compiling in win32
"Shuhu Li ( mike )" <[email protected]> Sun, 2 Dec 2007 09:07:29 +0000
| Newsgroups | gmane.comp.apache.mod-wackamole.general |
|---|---|
| Message-ID | <[email protected]> |
--===============0985422745==
Content-Type: multipart/alternative;
boundary="----=_Part_4442_23932930.1196586449662"
------=_Part_4442_23932930.1196586449662
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Finally got this file, hope it helps to compile on win32,
/* Don't edit this file, edit config.w32.h instead */
#ifndef CONFIG_H
#define CONFIG_H
#define _WIN32_WINNT 0x0501
#include <winsock2.h>
#undef interface
#define BUNDLEEXT "obj"
#define HAVE_GOOD_VARGS
#define IFNAMSIZ 256 /* can be huge names on windows */
#define ETH_ALEN 6
#define HAVE_SP_H 1
#define HAVE_PCAP_H 1
#define HAVE_STDIO_H 1
#define HAVE_SOCKLEN_T 1
#define HAVE_ERRNO_H 1
#define HAVE_ASSERT_H 1
#define HAVE_INTXX_T 1
#define HAVE_U_INTXX_T 1
typedef __int8 int8_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
typedef unsigned __int8 u_int_8_t;
typedef unsigned __int16 u_int_16_t;
typedef unsigned __int32 u_int_32_t;
/* pthread stubs */
#define DONT_USE_THREADS 1
#ifndef DONT_USE_THREADS
typedef DWORD pthread_t;
typedef CRITICAL_SECTION pthread_mutex_t;
typedef struct {
int detached;
} pthread_attr_t;
enum {
PTHREAD_CREATE_DETACHED = 1,
PTHREAD_CANCEL_DEFERRED = 0,
PTHREAD_CANCEL_ASYNCHRONOUS = 1,
};
int pthread_setcanceltype(int type, int *oldtype);
int pthread_cancel(pthread_t thread);
int pthread_create(pthread_t *thread, pthread_attr_t *attr,
void *(*start_routine)(void *), void *arg);
int pthread_attr_init(pthread_attr_t *attr);
int pthread_attr_setdetachstate(pthread_attr_t *attr, int state);
int pthread_attr_destroy(pthread_attr_t *attr);
int pthread_mutex_init(pthread_mutex_t *mutex, void *attr);
int pthread_mutex_lock(pthread_mutex_t *mutex);
int pthread_mutex_unlock(pthread_mutex_t *mutex);
int pthread_mutex_destroy(pthread_mutex_t *mutex);
#endif
/* fun with posix descriptors */
#define read _hide_ms_read
#define write _hide_ms_write
#define close _hide_ms_close
#include <io.h>
#undef read
#undef write
#undef close
int wackamole_win32_write(int fd, const void *buf, int len);
int wackamole_win32_read(int fd, void *buf, int len);
int wackamole_win32_close(int fd);
#define read wackamole_win32_read
#define write wackamole_win32_write
#define close wackamole_win32_close
#define EWOULDBLOCK EAGAIN
enum {
RTLD_GLOBAL,
RTLD_NOW
};
void *dlopen(const char *name, int flags);
void *dlsym(void *handle, const char *symbol);
void dlclose(void *handle);
const char *dlerror(void);
#include "defines.h"
#include <signal.h>
#endif
------=_Part_4442_23932930.1196586449662
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Finally got this file, hope it helps to compile on win32,<br><br><br>/* Don't edit this file, edit config.w32.h instead */<br>#ifndef CONFIG_H<br>#define CONFIG_H<br><br>#define _WIN32_WINNT 0x0501<br>#include <winsock2.h
><br>#undef interface<br><br>#define BUNDLEEXT "obj"<br>#define HAVE_GOOD_VARGS<br><br>#define IFNAMSIZ 256 /* can be huge names on windows */<br>#define ETH_ALEN 6<br><br>#define HAVE_SP_H 1<br>#define HAVE_PCAP_H 1
<br>#define HAVE_STDIO_H 1<br>#define HAVE_SOCKLEN_T 1<br>#define HAVE_ERRNO_H 1<br>#define HAVE_ASSERT_H 1<br><br>#define HAVE_INTXX_T 1<br>#define HAVE_U_INTXX_T 1<br>typedef __int8 int8_t;<br>typedef __int16 int16_t;<br>
typedef __int32 int32_t;<br>typedef unsigned __int8 u_int_8_t;<br>typedef unsigned __int16 u_int_16_t;<br>typedef unsigned __int32 u_int_32_t;<br><br>/* pthread stubs */<br><br>#define DONT_USE_THREADS 1<br><br>#ifndef DONT_USE_THREADS
<br>typedef DWORD pthread_t;<br>typedef CRITICAL_SECTION pthread_mutex_t;<br><br>typedef struct {<br> int detached;<br>} pthread_attr_t;<br><br>enum {<br> PTHREAD_CREATE_DETACHED = 1,<br><br> PTHREAD_CANCEL_DEFERRED = 0,
<br> PTHREAD_CANCEL_ASYNCHRONOUS = 1,<br>};<br><br>int pthread_setcanceltype(int type, int *oldtype);<br>int pthread_cancel(pthread_t thread);<br><br>int pthread_create(pthread_t *thread, pthread_attr_t *attr,<br> void *(*start_routine)(void *), void *arg);
<br>int pthread_attr_init(pthread_attr_t *attr);<br>int pthread_attr_setdetachstate(pthread_attr_t *attr, int state);<br>int pthread_attr_destroy(pthread_attr_t *attr);<br><br>int pthread_mutex_init(pthread_mutex_t *mutex, void *attr);
<br>int pthread_mutex_lock(pthread_mutex_t *mutex);<br>int pthread_mutex_unlock(pthread_mutex_t *mutex);<br>int pthread_mutex_destroy(pthread_mutex_t *mutex);<br>#endif<br><br>/* fun with posix descriptors */<br><br>#define read _hide_ms_read
<br>#define write _hide_ms_write<br>#define close _hide_ms_close<br>#include <io.h><br>#undef read<br>#undef write<br>#undef close<br><br>int wackamole_win32_write(int fd, const void *buf, int len);<br>int wackamole_win32_read(int fd, void *buf, int len);
<br>int wackamole_win32_close(int fd);<br><br>#define read wackamole_win32_read<br>#define write wackamole_win32_write<br>#define close wackamole_win32_close<br>#define EWOULDBLOCK EAGAIN<br><br>enum {<br> RTLD_GLOBAL,
<br> RTLD_NOW<br>};<br><br>void *dlopen(const char *name, int flags);<br>void *dlsym(void *handle, const char *symbol);<br>void dlclose(void *handle);<br>const char *dlerror(void);<br><br>#include "defines.h"
<br><br>#include <signal.h><br><br>#endif<br><br><br><br>
------=_Part_4442_23932930.1196586449662--
--===============0985422745==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
wackamole-users mailing list
[email protected]
http://lists.backhand.org/mailman/listinfo/wackamole-users
--===============0985422745==--