/* This testcase is part of GDB, the GNU debugger.
- Copyright 2004, 2007 Free Software Foundation, Inc.
+ Copyright 2004, 2007, 2009 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# define dlsym(handle, func) GetProcAddress (handle, func)
#endif
#define dlclose(handle) FreeLibrary (handle)
-#define dlerror() "error %d occurred", GetLastError ()
#else
#include <dlfcn.h>
#endif
if (!handle)
{
- fprintf (stderr, dlerror ());
+#ifdef __WIN32__
+ fprintf (stderr, "error %d occurred", GetLastError ());
+#else
+ fprintf (stderr, "%s", dlerror ());
+#endif
exit (1);
}