From f42c5415294d6927ecff1319dd6a6141626f6ff9 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 23 Jul 2009 22:51:56 +0000 Subject: Fixed glibc 2.10 compiler problems (Fedora 11 and others) with scandir() and strchr() (STR #2222). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6833 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/filename_list.cxx | 4 ++-- src/fl_set_fonts_xft.cxx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/filename_list.cxx b/src/filename_list.cxx index 75076a122..e32375557 100644 --- a/src/filename_list.cxx +++ b/src/filename_list.cxx @@ -77,8 +77,8 @@ int fl_filename_list(const char *d, dirent ***list, Fl_File_Sort_F *sort) { #ifndef HAVE_SCANDIR int n = scandir(d, list, 0, sort); -#elif defined(__hpux) || defined(__CYGWIN__) - // HP-UX, Cygwin define the comparison function like this: +#elif defined(HAVE_SCANDIR_POSIX) + // POSIX (2008) defines the comparison function like this: int n = scandir(d, list, 0, (int(*)(const dirent **, const dirent **))sort); #elif defined(__osf__) // OSF, DU 4.0x diff --git a/src/fl_set_fonts_xft.cxx b/src/fl_set_fonts_xft.cxx index b1762ced5..212626333 100644 --- a/src/fl_set_fonts_xft.cxx +++ b/src/fl_set_fonts_xft.cxx @@ -271,13 +271,13 @@ Fl_Font Fl::set_fonts(const char* pattern_name) // So the bit we want is up to the first comma - BUT some strings have // more than one name, separated by, guess what?, a comma... stop = start = first = 0; - stop = strchr((const char *)font, ','); - start = strchr((const char *)font, ':'); + stop = strchr((char *)font, ','); + start = strchr((char *)font, ':'); if ((stop) && (start) && (stop < start)) { first = stop + 1; // discard first version of name // find first comma *after* the end of the name - stop = strchr((const char *)start, ','); + stop = strchr((char *)start, ','); } else { -- cgit v1.2.3