Branch: Tag:

2009-03-19

2009-03-19 10:16:38 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved diagnostics for a common case on Win32.

Rev: src/dynamic_load.c:1.96

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: dynamic_load.c,v 1.95 2008/05/30 16:00:48 mast Exp $ + || $Id: dynamic_load.c,v 1.96 2009/03/19 10:16:38 grubba Exp $   */      #ifdef TESTING
108: Inside #if defined(HAVE_SOME_DLOPEN)
  static char * dlerror(void)   {    static char buffer[200]; +  int err = GetLastError(); +  switch(err) { +  case ERROR_MOD_NOT_FOUND: +  return "The specified module could not be found."; +  default:    sprintf(buffer,"LoadLibrary failed with error: %d",GetLastError()); -  +  }    return buffer;   }