port.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ident "ldclt @(#)port.h 1.4 01/04/03"
  2. /** BEGIN COPYRIGHT BLOCK
  3. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  4. * Copyright (C) 2006 Red Hat, Inc.
  5. * All rights reserved.
  6. *
  7. * License: GPL (version 3 or any later version).
  8. * See LICENSE for details.
  9. * END COPYRIGHT BLOCK **/
  10. #ifdef HAVE_CONFIG_H
  11. # include <config.h>
  12. #endif
  13. /*
  14. FILE : port.h
  15. AUTHOR : Jean-Luc SCHWING
  16. VERSION : 1.0
  17. DATE : 28 November 2000
  18. DESCRIPTION :
  19. This file contains the include (interface) definitions
  20. of port.c
  21. */
  22. /*
  23. * Tuning of the code
  24. */
  25. #ifdef HPUX /*JLS 01-12-00*/
  26. #define LDCLT_CAST_SIGACTION 1 /*JLS 01-12-00*/
  27. #define LDCLT_NO_DLOPEN 1 /*JLS 01-12-00*/
  28. #endif /*JLS 01-12-00*/
  29. #ifdef LINUX /*JLS 01-12-00*/
  30. #define LDCLT_CAST_SIGACTION 1 /*JLS 01-12-00*/
  31. #ifndef O_LARGEFILE /*JLS 03-04-01*/
  32. # define O_LARGEFILE 0100000 /*JLS 03-04-01*/
  33. #endif /*JLS 03-04-01*/
  34. #endif /*JLS 01-12-00*/
  35. /************************************************************************/
  36. /************************************************************************/
  37. /**************** Unix section ***********************/
  38. /************************************************************************/
  39. /************************************************************************/
  40. typedef pthread_mutex_t ldclt_mutex_t;
  41. typedef pthread_t ldclt_tid;
  42. /*
  43. * Portability functions common to all platforms
  44. */
  45. extern int ldclt_mutex_init (ldclt_mutex_t *mutex);
  46. extern int ldclt_mutex_lock (ldclt_mutex_t *mutex);
  47. extern int ldclt_mutex_unlock (ldclt_mutex_t *mutex);
  48. extern void ldclt_sleep (int nseconds);
  49. extern int ldclt_thread_create (ldclt_tid *tid, void *(*fct)(void *), void *param);