fspr_arch_dso.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* Licensed to the Apache Software Foundation (ASF) under one or more
  2. * contributor license agreements. See the NOTICE file distributed with
  3. * this work for additional information regarding copyright ownership.
  4. * The ASF licenses this file to You under the Apache License, Version 2.0
  5. * (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef DSO_H
  17. #define DSO_H
  18. #include "fspr_private.h"
  19. #include "fspr_general.h"
  20. #include "fspr_pools.h"
  21. #include "fspr_dso.h"
  22. #include "fspr.h"
  23. #if APR_HAS_DSO
  24. #ifdef HAVE_MACH_O_DYLD_H
  25. #include <mach-o/dyld.h>
  26. #endif
  27. #ifdef HAVE_DLFCN_H
  28. #include <dlfcn.h>
  29. #endif
  30. #ifdef HAVE_DL_H
  31. #include <dl.h>
  32. #endif
  33. #ifndef RTLD_NOW
  34. #define RTLD_NOW 1
  35. #endif
  36. #ifndef RTLD_GLOBAL
  37. #define RTLD_GLOBAL 0
  38. #endif
  39. #if (defined(__DragonFly__) ||\
  40. defined(__FreeBSD__) ||\
  41. defined(__OpenBSD__) ||\
  42. defined(__NetBSD__) ) && !defined(__ELF__)
  43. #define DLSYM_NEEDS_UNDERSCORE
  44. #endif
  45. struct fspr_dso_handle_t {
  46. fspr_pool_t *pool;
  47. void *handle;
  48. const char *errormsg;
  49. };
  50. #endif
  51. #endif