- Get services compiling with msvc (dhcp, eventlog, tcvpsvcs, rpcss, umpnpmgr). Also PCHified some stuff and reduced NDK usage.

svn path=/trunk/; revision=20700
This commit is contained in:
Alex Ionescu 2006-01-08 08:17:38 +00:00
parent 6075bfb808
commit 114d8bb1b6
12 changed files with 39 additions and 36 deletions

View file

@ -48,7 +48,7 @@ static char copyright[] =
#include "rosdhcp.h"
static INLINE int do_hash PROTO ((unsigned char *, int, int));
static __inline int do_hash PROTO ((unsigned char *, int, int));
struct hash_table *new_hash ()
{
@ -60,7 +60,7 @@ struct hash_table *new_hash ()
return rv;
}
static INLINE int do_hash (name, len, size)
static __inline int do_hash (name, len, size)
unsigned char *name;
int len;
int size;

View file

@ -50,12 +50,14 @@
#define ETH_ALEN 6
#define ETHER_ADDR_LEN ETH_ALEN
#include <pshpack1.h>
struct ether_header
{
u_int8_t ether_dhost[ETH_ALEN]; /* destination eth addr */
u_int8_t ether_shost[ETH_ALEN]; /* source ether addr */
u_int16_t ether_type; /* packet type ID field */
} __attribute__ ((__packed__));
};
#include <poppack.h>
struct ip
{
@ -94,18 +96,18 @@ struct udphdr {
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
//#include <sys/time.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <unistd.h>
//#include <unistd.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
//#include <unistd.h>
#include "dhcp.h"
#include "tree.h"
@ -274,6 +276,9 @@ struct hash_table {
#define MAX_TIME 0x7fffffff
#define MIN_TIME 0
#ifdef _MSC_VER
typedef SIZE_T ssize_t;
#endif
/* External definitions... */
@ -287,11 +292,19 @@ void do_packet(struct interface_info *, struct dhcp_packet *,
/* errwarn.c */
extern int warnings_occurred;
#ifdef _MSC_VER
void error(char *, ...);
int warning(char *, ...);
int note(char *, ...);
int debug(char *, ...);
int parse_warn(char *, ...);
#else
void error(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
int warning(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
int note(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
int debug(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
int parse_warn(char *, ...) __attribute__ ((__format__ (__printf__, 1, 2)));
#endif
/* conflex.c */
extern int lexline, lexchar;

View file

@ -2,12 +2,11 @@
#define ROSDHCP_H
#define WIN32_NO_STATUS
#include <windows.h>
#include <winsock2.h>
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
#include <iprtrmib.h>
#include <iphlpapi.h>
#include <winsock2.h>
#include <dhcpcsdk.h>
#include <stdio.h>
#include <setjmp.h>

View file

@ -11,10 +11,10 @@ char *piaddr( struct iaddr addr ) {
}
int note( char *format, ... ) {
va_list arg_begin;
va_start( arg_begin, format );
char buf[0x100];
int ret;
va_list arg_begin;
va_start( arg_begin, format );
ret = vsnprintf( buf, sizeof(buf), format, arg_begin );
@ -24,10 +24,10 @@ int note( char *format, ... ) {
}
int debug( char *format, ... ) {
va_list arg_begin;
va_start( arg_begin, format );
char buf[0x100];
int ret;
va_list arg_begin;
va_start( arg_begin, format );
ret = vsnprintf( buf, sizeof(buf), format, arg_begin );
@ -37,10 +37,10 @@ int debug( char *format, ... ) {
}
int warn( char *format, ... ) {
va_list arg_begin;
va_start( arg_begin, format );
char buf[0x100];
int ret;
va_list arg_begin;
va_start( arg_begin, format );
ret = vsnprintf( buf, sizeof(buf), format, arg_begin );
@ -50,10 +50,10 @@ int warn( char *format, ... ) {
}
int warning( char *format, ... ) {
va_list arg_begin;
va_start( arg_begin, format );
char buf[0x100];
int ret;
va_list arg_begin;
va_start( arg_begin, format );
ret = vsnprintf( buf, sizeof(buf), format, arg_begin );
@ -63,9 +63,9 @@ int warning( char *format, ... ) {
}
void error( char *format, ... ) {
char buf[0x100];
va_list arg_begin;
va_start( arg_begin, format );
char buf[0x100];
vsnprintf( buf, sizeof(buf), format, arg_begin );

View file

@ -11,8 +11,11 @@
#define WIN32_NO_STATUS
#include <windows.h>
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
#include <lpctypes.h>
#include <lpcfuncs.h>
#include <rtlfuncs.h>
#include <obfuncs.h>
#include <iotypes.h>
#include <debug.h>
#include "eventlogrpc_s.h"

View file

@ -6,8 +6,7 @@
#include <stdio.h>
#define WIN32_NO_STATUS
#include <windows.h>
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
VOID
StartEndpointMapper(VOID);

View file

@ -12,9 +12,6 @@
*
*/
#include <stdio.h>
#include <winsock2.h>
#include <tchar.h>
#include "tcpsvcs.h"
extern BOOL bShutDown;

View file

@ -12,10 +12,6 @@
*
*/
#include <stdio.h>
#include <winsock2.h>
#include <tchar.h>
#include <time.h>
#include "tcpsvcs.h"
DWORD WINAPI DaytimeHandler(VOID* Sock_)

View file

@ -12,10 +12,6 @@
*
*/
#include <stdio.h>
#include <winsock2.h>
#include <tchar.h>
#include <time.h>
#include "tcpsvcs.h"
#define QBUFSIZ 160

View file

@ -12,11 +12,11 @@
*
*/
#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <winsock2.h>
#include <tchar.h>
#include <time.h>
#define UNICODE
#define _UNICODE

View file

@ -13,4 +13,5 @@
<file>qotd.c</file>
<file>chargen.c</file>
<file>tcpsvcs.rc</file>
<pch>tcpsvcs.h</pch>
</module>

View file

@ -28,8 +28,7 @@
/* INCLUDES *****************************************************************/
#define WIN32_NO_STATUS
#include <windows.h>
#define NTOS_MODE_USER
#include <ndk/ntndk.h>
#include <cmtypes.h>
#include <umpnpmgr/sysguid.h>
#include <wdmguid.h>
#include <cfgmgr32.h>