Index: ChangeLog =================================================================== RCS file: /cvsroot/xforms/xforms/ChangeLog,v retrieving revision 1.39 diff -u -p -r1.39 ChangeLog --- ChangeLog 22 May 2003 18:49:51 -0000 1.39 +++ ChangeLog 31 Jul 2003 16:16:35 -0000 @@ -1,3 +1,20 @@ +2003-07-31 Jean-Marc Lasgouttes + + * lib/local.h (FL_SIGRET): + + * lib/signal.c (default_signal_handler): use RETSIGTYPE instead of + FL_SIG_RET + + * lib/errmsg.c (fl_get_syserror_msg): use HAVE_STRERROR + + * lib/sysdep.c (fl_msleep): use HAVE_USLEEP + + * lib/local.h: remove variables DONT_HAVE_USLEEP, + DONT_HAVE_STRERROR, NO_CONST (handled by AC_C_CONST), + FL_SIGRET_IS_VOID, FL_SIGRET + + * configure.ac: check for usleep too + 2003-05-22 Angus Leeming * Changes: move its contents to the bottom of this file (ChangeLog) Index: configure.ac =================================================================== RCS file: /cvsroot/xforms/xforms/configure.ac,v retrieving revision 1.3 diff -u -p -r1.3 configure.ac --- configure.ac 22 May 2003 17:47:15 -0000 1.3 +++ configure.ac 31 Jul 2003 16:16:35 -0000 @@ -84,7 +84,7 @@ AC_CHECK_HEADERS([fcntl.h float.h limits # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STAT -AC_C_CONST +AC_C_CONST dnl used AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME @@ -93,11 +93,11 @@ AC_STRUCT_TM # Checks for library functions. AC_FUNC_FORK AC_FUNC_MALLOC -AC_TYPE_SIGNAL +AC_TYPE_SIGNAL dnl used AC_FUNC_STAT AC_FUNC_STRTOD AC_FUNC_VPRINTF -AC_CHECK_FUNCS([dup2 endpwent floor ftime getcwd gethostname gettimeofday getwd memmove memset modf pow putenv select setlocale strcasecmp strchr strdup strerror strrchr strstr strtol]) +AC_CHECK_FUNCS([usleep dup2 endpwent floor ftime getcwd gethostname gettimeofday getwd memmove memset modf pow putenv select setlocale strcasecmp strchr strdup strerror strrchr strstr strtol]) AC_CHECK_FUNCS(snprintf vsnprintf) XFORMS_CHECK_DECL(snprintf, stdio.h) Index: lib/errmsg.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/errmsg.c,v retrieving revision 1.7 diff -u -p -r1.7 errmsg.c --- lib/errmsg.c 24 Apr 2003 09:35:34 -0000 1.7 +++ lib/errmsg.c 31 Jul 2003 16:16:35 -0000 @@ -58,7 +58,7 @@ char *id_errm = "$Id: errmsg.c,v 1.7 200 #include "ulib.h" extern int errno; /* system error no */ -#ifdef DONT_HAVE_STRERROR +#ifndef HAVE_STRERROR extern char *sys_errlist[]; #endif @@ -98,7 +98,7 @@ fl_set_error_handler( FL_ERROR_FUNC user const char *fl_get_syserror_msg(void) { const char *pp; -#ifndef DONT_HAVE_STRERROR +#ifdef HAVE_STRERROR pp = errno ? strerror(errno) : ""; #else pp = errno ? sys_errlist[errno]:""; Index: lib/flinternal.h =================================================================== RCS file: /cvsroot/xforms/xforms/lib/flinternal.h,v retrieving revision 1.3 diff -u -p -r1.3 flinternal.h --- lib/flinternal.h 17 Apr 2003 11:48:17 -0000 1.3 +++ lib/flinternal.h 31 Jul 2003 16:16:35 -0000 @@ -353,7 +353,7 @@ typedef struct fl_freelist_ } FL_FREE_REC; -typedef FL_SIGRET(*FL_OSSIG_HANDLER) (int); +typedef RETSIGTYPE(*FL_OSSIG_HANDLER) (int); typedef struct fl_signallist_ { Index: lib/local.h =================================================================== RCS file: /cvsroot/xforms/xforms/lib/local.h,v retrieving revision 1.5 diff -u -p -r1.5 local.h --- lib/local.h 30 May 2003 10:09:37 -0000 1.5 +++ lib/local.h 31 Jul 2003 16:16:35 -0000 @@ -41,19 +41,6 @@ extern int strcasecmp(const char *, const char *); #endif -#define DONT_HAVE_USLEEP - -#define FL_SIGRET_IS_VOID -#define FL_SIGRET void - -#if defined(__linux__)||defined(linux) -#undef DONT_HAVE_USLEEP -#endif - -/* solaris: do we need to check the version number ? */ -#if defined(__SUNPRO_C) && __SUNPRO_C >=0x500 -#endif - #if defined(Lynx) #define NEED_GETCWD #endif @@ -76,39 +63,20 @@ extern int gettimeofday(struct timeval * /* (some) suns do not have strerror, use sys_errlist */ #if ( defined(sun) || defined(__sun__) ) && !defined( SYSV ) -#define DONT_HAVE_STRERROR -#define DONT_HAVE_ATEXIT #define BAD_SPRINTF /* returns char * */ #endif -/*#if defined(__sgi) - #endif - */ - -/* #if defined(_HPUX_SOURCE) - #endif - */ #if defined(M_XENIX) #define NO_SOCK #endif -/* #define NO_CONST */ - -/* prototype is currently required */ - -/* #define NO_PROTOTYPE */ /********* End of Configurable stuff ***********/ /* some header has XK_XP_Left etc */ #if (XlibSpecificationRelease>=6) #define HAVE_KP_DEFINE 1 -#endif - -#ifdef NO_CONST -#undef const -#define const #endif #ifndef FL_PATH_MAX Index: lib/signal.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/signal.c,v retrieving revision 1.5 diff -u -p -r1.5 signal.c --- lib/signal.c 24 Apr 2003 09:35:35 -0000 1.5 +++ lib/signal.c 31 Jul 2003 16:16:35 -0000 @@ -63,7 +63,7 @@ handle_signal(void) static int sig_direct; -static FL_SIGRET +static RETSIGTYPE default_signal_handler(int sig) { fl_signal_caught(sig); @@ -79,7 +79,7 @@ default_signal_handler(int sig) } #if !defined(M_XENIX) && !defined(_WIN32) -#if !defined( FL_SIGRET_IS_VOID ) +#if REGSYGTYPE == void return 0; #endif #endif Index: lib/sysdep.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/sysdep.c,v retrieving revision 1.5 diff -u -p -r1.5 sysdep.c --- lib/sysdep.c 24 Apr 2003 09:35:35 -0000 1.5 +++ lib/sysdep.c 31 Jul 2003 16:16:35 -0000 @@ -140,7 +140,7 @@ fl_msleep(unsigned long msec) _sleep(msec); return 0; #else -#if !defined(DONT_HAVE_USLEEP) +#if !defined(HAVE_USLEEP) usleep(msec * 1000); return 0; #else