sysdep.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef SYSDEP_H
  2. #define SYSDEP_H
  3. /*
  4. * Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
  5. * Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
  6. * Digital Equipment Corporation, Maynard, Mass.
  7. * Copyright (c) 1998 Microsoft.
  8. * To anyone who acknowledges that this file is provided "AS IS"
  9. * without any express or implied warranty: permission to use, copy,
  10. * modify, and distribute this file for any purpose is hereby
  11. * granted without fee, provided that the above copyright notices and
  12. * this notice appears in all source code copies, and that none of
  13. * the names of Open Software Foundation, Inc., Hewlett-Packard
  14. * Company, or Digital Equipment Corporation be used in advertising
  15. * or publicity pertaining to distribution of the software without
  16. * specific, written prior permission. Neither Open Software
  17. * Foundation, Inc., Hewlett-Packard Company, Microsoft, nor Digital Equipment
  18. * Corporation makes any representations about the suitability of
  19. * this software for any purpose.
  20. */
  21. /*!
  22. * \file
  23. */
  24. #include "ithread.h"
  25. /* change to point to where MD5 .h's live */
  26. /* get MD5 sample implementation from RFC 1321 */
  27. #include "global.h"
  28. #include "md5.h"
  29. #include "UpnpStdInt.h"
  30. #include <sys/types.h>
  31. #ifdef WIN32
  32. /* Do not #include <sys/time.h> */
  33. #else
  34. #include <sys/time.h>
  35. #endif
  36. /*! set the following to the number of 100ns ticks of the actual resolution of
  37. * your system's clock */
  38. #define UUIDS_PER_TICK 1024
  39. /*! Set the following to a call to acquire a system wide global lock. */
  40. extern ithread_mutex_t gUUIDMutex;
  41. #define UUIDLock() ithread_mutex_lock(&gUUIDMutex)
  42. #define UUIDUnlock() ithread_mutex_unlock(&gUUIDMutex)
  43. typedef uint64_t uuid_time_t;
  44. typedef struct {
  45. char nodeID[6];
  46. } uuid_node_t;
  47. void get_ieee_node_identifier(uuid_node_t * node);
  48. void get_system_time(uuid_time_t * uuid_time);
  49. void get_random_info(unsigned char seed[16]);
  50. #endif /* SYSDEP_H */