X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/22a86e9300bc489906b09bad0e6be79588c4b41c..ba5e8b528ff29715f5a9008137e117a9fbcc24b0:/buildtools/Cmake/test_prog/prog_gnu_dynlinker.c diff --git a/buildtools/Cmake/test_prog/prog_gnu_dynlinker.c b/buildtools/Cmake/test_prog/prog_gnu_dynlinker.c deleted file mode 100644 index 6187f9ed9b..0000000000 --- a/buildtools/Cmake/test_prog/prog_gnu_dynlinker.c +++ /dev/null @@ -1,33 +0,0 @@ -/* prog_gnu_dynlinker.c -- check that RTLD_NEXT is defined as in GNU linker */ -/* Copyright (c) 2012-2014. The SimGrid Team. - * All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -#define _GNU_SOURCE 1 -#include -#include -#include -#include - -static void * (*real_malloc) (size_t); - -int main(void) { - char *error; - dlerror(); // clear any previous error - real_malloc = (void * (*) (size_t)) dlsym(RTLD_NEXT, "malloc"); - error = dlerror(); - if (!error && real_malloc) { - char *A = real_malloc(20); - strcpy(A,"epic success"); - free(A); - return 0; // SUCCESS - } else { - if (error) - printf("Error while checking for dlsym: %s\n",error); - else - printf("dlsym did not return any error, but failed to find malloc()\n"); - return 1; // FAILED - } -}