libdl2.c 592 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * This is a fake version of the dynamic loading library for machines
  3. * which don't have it, and don't even have an nlist.
  4. * We fake it so that everything fails.
  5. */
  6. #include "sysdep.h"
  7. static char *lasterror;
  8. char *
  9. dlerror(void)
  10. {
  11. char *res;
  12. res = lasterror;
  13. lasterror = NULL;
  14. return (res);
  15. }
  16. void *
  17. dlopen(char *name, int flags)
  18. {
  19. lasterror = "Dynamic loading not supported on this machine";
  20. return (NULL);
  21. }
  22. int
  23. dlclose(void *lib)
  24. {
  25. return (0);
  26. }
  27. void *
  28. dlsym(void *lib, char *name)
  29. {
  30. lasterror = "Dynamic loading not supported on this machine";
  31. return (NULL);
  32. }