Determining if the GLPK library is compiled to be reentrant.

Heinrich Schuchardt <[email protected]>
Newsgroups gmane.comp.gnu.glpk
Message-ID <[email protected]>
Hello Andrew,

a program that uses a GLPK library which is not compiled with thread
local storage may fail fatally when run with multiple threads.

I hence suggest to add a function that allows to determine if GLPK was
compiled to be reentrant. We could use the same function to return other
features too.

typedef struct {
   char * option;
   char * value;
} glp_build_options;

#include "config.h"

static glp_build_options build_options[] = {
      {"TLS",
#ifdef TLS
      "available" },
#else
      NULL },
#endif
      {"ODBC_DLNAME",
#ifdef ODBC_DLNAME
      ODBC_DLNAME},
#else
      NULL},
#endif
      {NULL, NULL}
   };

glp_build_options *glp_version_ex() {
   return build_options;
}

Best regards

Heinrich Schuchardt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.