White spaces.

(cherry picked from commit d6418b3e17d0241cdaa4af73355bb93e50c5acf1)
This commit is contained in:
Marcelo Roberto Jimenez 2010-12-18 15:47:09 -02:00
parent 59c70e2a0e
commit dd75baab6b
2 changed files with 18 additions and 44 deletions

View File

@ -1,24 +1,19 @@
#ifndef UPNPGLOBAL_H #ifndef UPNPGLOBAL_H
#define UPNPGLOBAL_H #define UPNPGLOBAL_H
/*! /*!
* \file * \file
* *
* \brief Defines constants that for some reason are not defined on some systems. * \brief Defines constants that for some reason are not defined on some systems.
*/ */
#if defined MYLIB_LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 != 64 #if defined MYLIB_LARGEFILE_SENSITIVE && _FILE_OFFSET_BITS+0 != 64
#if defined __GNUC__ #if defined __GNUC__
#warning libupnp requires largefile mode - use AC_SYS_LARGEFILE #warning libupnp requires largefile mode - use AC_SYS_LARGEFILE
#else #else
#error libupnp requires largefile mode - use AC_SYS_LARGEFILE #error libupnp requires largefile mode - use AC_SYS_LARGEFILE
#endif #endif
#endif #endif
#ifdef WIN32 #ifdef WIN32
/* /*
@ -36,7 +31,6 @@
#endif /* LIBUPNP_EXPORTS */ #endif /* LIBUPNP_EXPORTS */
#endif /* UPNP_STATIC_LIB */ #endif /* UPNP_STATIC_LIB */
/* /*
* UPNP_INLINE * UPNP_INLINE
* PRId64 * PRId64
@ -50,7 +44,6 @@
#define PRIzu "lu" #define PRIzu "lu"
#endif /* UPNP_USE_MSVCPP */ #endif /* UPNP_USE_MSVCPP */
#ifdef UPNP_USE_BCBPP #ifdef UPNP_USE_BCBPP
/* define some things Borland Builder doesn't know */ /* define some things Borland Builder doesn't know */
#define UPNP_INLINE inline #define UPNP_INLINE inline
@ -61,10 +54,8 @@
#define PRIzu "zu" #define PRIzu "zu"
#endif /* UPNP_USE_BCBPP */ #endif /* UPNP_USE_BCBPP */
#ifdef __GNUC__ #ifdef __GNUC__
#define UPNP_INLINE inline #define UPNP_INLINE inline
/* Note with PRIzu that in the case of Mingw32, it's the MS C /* Note with PRIzu that in the case of Mingw32, it's the MS C
* runtime printf which ends up getting called, not the glibc * runtime printf which ends up getting called, not the glibc
* printf, so it genuinely doesn't have "zu" * printf, so it genuinely doesn't have "zu"
@ -93,7 +84,7 @@
#else #else
#define UPNP_INLINE inline #define UPNP_INLINE inline
#endif #endif
/*! /*!
* \brief Supply the PRId64 printf() macro. * \brief Supply the PRId64 printf() macro.
* *
@ -111,7 +102,6 @@
#define PRIzu "zu" #define PRIzu "zu"
#endif #endif
/* /*
* Defining this macro here gives some interesting information about unused * Defining this macro here gives some interesting information about unused
* functions in the code. Of course, this should never go uncommented on a * functions in the code. Of course, this should never go uncommented on a
@ -119,6 +109,4 @@
*/ */
/*#define inline*/ /*#define inline*/
#endif /* UPNPGLOBAL_H */ #endif /* UPNPGLOBAL_H */

View File

@ -1,3 +1,6 @@
#ifndef SYSDEP_H
#define SYSDEP_H
/* /*
* Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc. * Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
* Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. & * Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
@ -17,74 +20,57 @@
* this software for any purpose. * this software for any purpose.
*/ */
/*!
#ifndef SYSDEP_H * \file
#define SYSDEP_H */
#include "ithread.h" #include "ithread.h"
/* change to point to where MD5 .h's live */ /* change to point to where MD5 .h's live */
/* get MD5 sample implementation from RFC 1321 */ /* get MD5 sample implementation from RFC 1321 */
#include "global.h" #include "global.h"
#include "md5.h" #include "md5.h"
#include <sys/types.h> #include <sys/types.h>
#ifdef WIN32 #ifdef WIN32
/* Do not #include <sys/time.h> */ /* Do not #include <sys/time.h> */
#else #else
#include <sys/time.h> #include <sys/time.h>
#endif #endif
/*! set the following to the number of 100ns ticks of the actual resolution of
/* set the following to the number of 100ns ticks of the actual * your system's clock */
resolution of
your system's clock */
#define UUIDS_PER_TICK 1024 #define UUIDS_PER_TICK 1024
/*! Set the following to a call to acquire a system wide global lock. */
/* Set the following to a call to acquire a system wide global lock
*/
extern ithread_mutex_t gUUIDMutex; extern ithread_mutex_t gUUIDMutex;
#define UUIDLock() ithread_mutex_lock(&gUUIDMutex) #define UUIDLock() ithread_mutex_lock(&gUUIDMutex)
#define UUIDUnlock() ithread_mutex_unlock(&gUUIDMutex) #define UUIDUnlock() ithread_mutex_unlock(&gUUIDMutex)
typedef unsigned long unsigned32;
typedef unsigned short unsigned16;
typedef unsigned char unsigned8;
typedef unsigned char byte;
typedef unsigned long unsigned32; /*! Set this to what your compiler uses for 64 bit data type */
typedef unsigned short unsigned16;
typedef unsigned char unsigned8;
typedef unsigned char byte;
/* Set this to what your compiler uses for 64 bit data type */
#ifdef WIN32 #ifdef WIN32
#define unsigned64_t __int64 #define unsigned64_t __int64
#else #else
#define unsigned64_t unsigned long long #define unsigned64_t unsigned long long
#endif #endif
#define I64(C) C##LL #define I64(C) C##LL
typedef unsigned64_t uuid_time_t; typedef unsigned64_t uuid_time_t;
typedef struct { typedef struct {
char nodeID[6]; char nodeID[6];
} uuid_node_t; } uuid_node_t;
void get_ieee_node_identifier(uuid_node_t * node);
void get_ieee_node_identifier(uuid_node_t *node); void get_system_time(uuid_time_t * uuid_time);
void get_system_time(uuid_time_t *uuid_time);
void get_random_info(unsigned char seed[16]); void get_random_info(unsigned char seed[16]);
#endif /* SYSDEP_H */ #endif /* SYSDEP_H */