Skip to content
Snippets Groups Projects
Select Git revision
  • fe46a5d72f1a24d88f774c1bb1eb6e417d0e44b9
  • master default protected
  • 9.0
  • marcus/wix3
  • 8.0
  • nt-tools
  • 7.8
  • 7.6
  • 7.4
  • 7.2
  • 7.0
  • 0.6
  • rosuav/latex-markdown-renderer
  • rxnpatch/rxnpatch
  • marcus/gobject-introspection
  • rxnpatch/8.0
  • rosuav/pre-listening-ports
  • rosuav/async-annotations
  • rosuav/pgsql-ssl
  • rxnpatch/rxnpatch-broken/2023-10-06T094250
  • grubba/fdlib
  • v8.0.2020
  • v8.0.2018
  • v8.0.2016
  • v8.0.2014
  • v8.0.2012
  • v8.0.2008
  • v8.0.2006
  • v8.0.2004
  • v8.0.2002
  • v8.0.2000
  • v8.0.1998
  • v8.0.1996
  • v8.0.1994
  • v8.0.1992
  • v8.0.1990
  • v8.0.1988
  • v8.0.1986
  • rxnpatch/clusters/8.0/2025-04-29T124414
  • rxnpatch/2025-04-29T124414
  • v8.0.1984
41 results

compilation.h

Blame
  • dlopen-test.c 786 B
    #include "testutils.h"
    #include "version.h"
    
    #if HAVE_DLFCN_H
    #include <dlfcn.h>
    #endif
    
    #ifdef __APPLE__
    #define SO_EXT "dylib"
    #else
    #define SO_EXT "so"
    #endif
    
    int
    main (int argc UNUSED, char **argv UNUSED)
    {
    #if HAVE_LIBDL
      void *handle = dlopen ("../libnettle." SO_EXT, RTLD_NOW);
      int (*get_version)(void);
      if (!handle)
        {
          fprintf (stderr, "dlopen failed: %s\n", dlerror());
          FAIL ();
        }
    
      get_version = (int(*)(void)) dlsym (handle, "nettle_version_minor");
      if (!get_version)
        {
          fprintf (stderr, "dlsym failed: %s\n", dlerror());
          FAIL ();
        }
      if (get_version() != NETTLE_VERSION_MINOR)
        {
          fprintf (stderr, "unexpected nettle version\n");
          FAIL ();
        }
      dlclose (handle);
      return EXIT_SUCCESS;
    #else
      SKIP();
    #endif
    }