ReactOS  0.4.14-dev-604-gcfdd483
wintirpc.h File Reference
#include <stdlib.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
#include <process.h>
#include <basetsd.h>
Include dependency graph for wintirpc.h:

Go to the source code of this file.

Classes

struct  timezone
 
struct  sockaddr_un
 

Macros

#define _CRT_SECURE_NO_WARNINGS   1
 
#define snprintf   _snprintf
 
#define strcasecmp   _stricmp
 
#define getpid   _getpid
 
#define bcmp   memcmp
 
#define bcopy(d, s, l)   memcpy(d,s,l)
 
#define bzero(d, s)   memset(d,0,s)
 
#define strtok_r   strtok_s
 
#define poll   WSAPoll
 
#define ioctl   ioctlsocket
 
#define __BEGIN_DECLS
 
#define __END_DECLS
 
#define __THROW
 
#define WINSOCK_HANDLE_HASH_SIZE   1024
 
#define WINSOCK_HANDLE_HASH(x)   (((x) >> 2) % WINSOCK_HANDLE_HASH_SIZE)
 
#define SOL_IPV6   IPPROTO_IPV6
 
#define MAXHOSTNAMELEN   256
 
#define SUN_LEN(ptr)   ((unsigned int)(sizeof(int) + strlen ((ptr)->sun_path)))
 

Functions

int gettimeofday (struct timeval *tv, struct timezone *tz)
 
int asprintf (char **str, const char *fmt,...)
 
void wintirpc_debug (char *fmt,...)
 

Macro Definition Documentation

◆ __BEGIN_DECLS

#define __BEGIN_DECLS

Definition at line 62 of file wintirpc.h.

◆ __END_DECLS

#define __END_DECLS

Definition at line 63 of file wintirpc.h.

◆ __THROW

#define __THROW

Definition at line 64 of file wintirpc.h.

◆ _CRT_SECURE_NO_WARNINGS

#define _CRT_SECURE_NO_WARNINGS   1

Definition at line 29 of file wintirpc.h.

◆ bcmp

#define bcmp   memcmp

Definition at line 54 of file wintirpc.h.

◆ bcopy

#define bcopy (   d,
  s,
  l 
)    memcpy(d,s,l)

Definition at line 55 of file wintirpc.h.

◆ bzero

#define bzero (   d,
  s 
)    memset(d,0,s)

Definition at line 56 of file wintirpc.h.

◆ getpid

#define getpid   _getpid

Definition at line 52 of file wintirpc.h.

◆ ioctl

#define ioctl   ioctlsocket

Definition at line 60 of file wintirpc.h.

◆ MAXHOSTNAMELEN

#define MAXHOSTNAMELEN   256

Definition at line 86 of file wintirpc.h.

◆ poll

#define poll   WSAPoll

Definition at line 59 of file wintirpc.h.

◆ snprintf

#define snprintf   _snprintf

Definition at line 48 of file wintirpc.h.

◆ SOL_IPV6

#define SOL_IPV6   IPPROTO_IPV6

Definition at line 84 of file wintirpc.h.

◆ strcasecmp

#define strcasecmp   _stricmp

Definition at line 50 of file wintirpc.h.

◆ strtok_r

#define strtok_r   strtok_s

Definition at line 57 of file wintirpc.h.

◆ SUN_LEN

#define SUN_LEN (   ptr)    ((unsigned int)(sizeof(int) + strlen ((ptr)->sun_path)))

Definition at line 94 of file wintirpc.h.

◆ WINSOCK_HANDLE_HASH

#define WINSOCK_HANDLE_HASH (   x)    (((x) >> 2) % WINSOCK_HANDLE_HASH_SIZE)

Definition at line 70 of file wintirpc.h.

◆ WINSOCK_HANDLE_HASH_SIZE

#define WINSOCK_HANDLE_HASH_SIZE   1024

Definition at line 69 of file wintirpc.h.

Function Documentation

◆ asprintf()

int asprintf ( char **  str,
const char fmt,
  ... 
)

Definition at line 95 of file asprintf.c.

96 {
97  va_list ap;
98  int ret;
99 
100  *str = NULL;
101  va_start(ap, fmt);
102  ret = vasprintf(str, fmt, ap);
103  va_end(ap);
104 
105  return ret;
106 }
int vasprintf(char **str, const char *fmt, va_list ap)
Definition: asprintf.c:49
#define va_end(ap)
Definition: acmsvcex.h:90
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
char * va_list
Definition: acmsvcex.h:78
int ret
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
Definition: dsound.c:943

Referenced by __rpc_taddr2uaddr_af().

◆ gettimeofday()

int gettimeofday ( struct timeval tv,
struct timezone tz 
)

Definition at line 308 of file fake.c.

309 {
310  FILETIME ft;
311  LARGE_INTEGER li;
312  __int64 t;
313  static int tzflag;
314 
315  if (tv)
316  {
318  li.LowPart = ft.dwLowDateTime;
319  li.HighPart = ft.dwHighDateTime;
320  t = li.QuadPart; /* In 100-nanosecond intervals */
321  t -= EPOCHFILETIME; /* Offset to the Epoch time */
322  t /= 10; /* In microseconds */
323  tv->tv_sec = (long)(t / 1000000);
324  tv->tv_usec = (long)(t % 1000000);
325  }
326 
327  if (tz)
328  {
329  if (!tzflag)
330  {
331  _tzset();
332  tzflag++;
333  }
334  tz->tz_minuteswest = _timezone / 60;
335  tz->tz_dsttime = _daylight;
336  }
337 
338  return 0;
339 }
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
Definition: time.c:128
_CRTIMP void __cdecl _tzset(void)
Definition: timezone.c:92
unsigned long tv_sec
Definition: linux.h:1738
GLdouble GLdouble t
Definition: gl.h:2047
DWORD dwHighDateTime
Definition: mapidefs.h:66
unsigned long tv_usec
Definition: linux.h:1739
int _daylight
Definition: timezone.c:30
ULONG LowPart
Definition: typedefs.h:104
long _timezone
Definition: timezone.c:46
#define long
Definition: qsort.c:33
GLbyte GLbyte tz
Definition: glext.h:8756
#define EPOCHFILETIME
Definition: fake.c:303
DWORD dwLowDateTime
Definition: mapidefs.h:65
#define __int64
Definition: basetyps.h:16
LONGLONG QuadPart
Definition: typedefs.h:112

◆ wintirpc_debug()

void wintirpc_debug ( char fmt,
  ... 
)

Definition at line 179 of file wintirpc.c.

180 {
181 #ifdef _DEBUG
182  char buffer[2048];
183 #else
184  static int triedToOpen = 0;
185  static FILE *dbgFile = NULL;
186 #endif
187 
188  va_list vargs;
189  va_start(vargs, fmt);
190 
191 #ifdef _DEBUG
192  vsprintf(buffer, fmt, vargs);
194 #else
195  if (dbgFile == NULL && triedToOpen == 0) {
196  triedToOpen = 1;
197  dbgFile = fopen("c:\\etc\\rpcsec_gss_debug.txt", "w");
198  }
199  if (dbgFile != NULL) {
200  vfprintf(dbgFile, fmt, vargs);
201  fflush(dbgFile);
202  }
203 #endif
204 
205  va_end(vargs);
206 }
GLuint buffer
Definition: glext.h:5915
#define va_end(ap)
Definition: acmsvcex.h:90
smooth NULL
Definition: ftsmooth.c:416
char * va_list
Definition: acmsvcex.h:78
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fflush(_Inout_opt_ FILE *_File)
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define va_start(ap, A)
Definition: acmsvcex.h:91
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
Definition: dsound.c:943
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
Definition: ignoredbgout.c:18