* src/gdb/testsuite/gdb.base/unload.c: Avoid warning in fprintf.
* src/gdb/testsuite/gdb.base/watchpoint-solib.c: Idem.
+2009-10-01 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * src/gdb/testsuite/gdb.base/shr1.c: Use %p in format string.
+ * src/gdb/testsuite/gdb.base/unload.c: Avoid warning in fprintf.
+ * src/gdb/testsuite/gdb.base/watchpoint-solib.c: Idem.
+
2009-10-01 Pierre Muller <muller@ics.u-strasbg.fr>
* gdb.base/fileio.c (test_lseek): typecast ofs_t ret variable to
sg = 6.6;
sgi++;
sgs = 8;
- printf("address of sgs is 0x%x\n", &sgs);
+ printf("address of sgs is %p\n", &sgs);
return 2*x;
}
# 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 (!unloadshr)
{
- fprintf (stderr, dlerror ());
+#ifdef __WIN32__
+ fprintf (stderr, "error %d occurred", GetLastError ());
+#else
+ fprintf (stderr, "%s", dlerror ());
+#endif
exit (1);
}
# 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);
}