diff options
author | Andy Wingo <wingo@pobox.com> | 2013-03-09 16:39:47 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2013-03-09 16:47:21 +0100 |
commit | 09b204d38756f0fa9ab4319874c8ce2838488dd0 (patch) | |
tree | 0e338d1eaf251b6dfa2ba81770231281a1d3d469 /libguile/error.c | |
parent | 7e369c38993cc7cf4063a6cadc8496552abf323d (diff) | |
download | guile-09b204d38756f0fa9ab4319874c8ce2838488dd0.tar.gz |
squish remove some mingw-specific code that is covered by gnulib
* libguile/socket.c (scm_init_socket): Remove mingw-specific code.
* libguile/fports.c: Remove ftruncate redefine; mingw is fine.
(scm_i_fdes_to_port): If we have no F_GETFL, just do an fstat. The
right place for an F_GETFL replacement would be in gnulib.
(fport_input_waiting): Remove an outdated comment.
* libguile/error.c (SCM_I_STRERROR, SCM_I_ERRNO): Remove, replacing uses
with strerror and errno.
* libguile/win32-socket.c:
* libguile/win32-socket.h: Remove. Mingw has suitable replacements.
* configure.ac:
* libguile/Makefile.am (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(noinst_HEADERS): Update for win32-socket removal.
Diffstat (limited to 'libguile/error.c')
-rw-r--r-- | libguile/error.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/libguile/error.c b/libguile/error.c index 790ed0571..0df4c737e 100644 --- a/libguile/error.c +++ b/libguile/error.c @@ -1,5 +1,5 @@ /* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2004, 2006, 2010, - * 2012 Free Software Foundation, Inc. + * 2012, 2013 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -100,17 +100,6 @@ SCM_DEFINE (scm_error_scm, "scm-error", 5, 0, 0, } #undef FUNC_NAME -#if defined __MINGW32__ && defined HAVE_NETWORKING -# include "win32-socket.h" -# define SCM_I_STRERROR(err) \ - ((err >= WSABASEERR) ? scm_i_socket_strerror (err) : strerror (err)) -# define SCM_I_ERRNO() \ - (errno ? errno : scm_i_socket_errno ()) -#else -# define SCM_I_STRERROR(err) strerror (err) -# define SCM_I_ERRNO() errno -#endif /* __MINGW32__ */ - /* strerror may not be thread safe, for instance in glibc (version 2.3.2) an error number not among the known values results in a string like "Unknown error 9999" formed in a static buffer, which will be overwritten by a @@ -136,7 +125,7 @@ SCM_DEFINE (scm_strerror, "strerror", 1, 0, 0, scm_dynwind_begin (0); scm_i_dynwind_pthread_mutex_lock (&scm_i_misc_mutex); - ret = scm_from_locale_string (SCM_I_STRERROR (scm_to_int (err))); + ret = scm_from_locale_string (strerror (scm_to_int (err))); scm_dynwind_end (); return ret; @@ -147,7 +136,7 @@ SCM_GLOBAL_SYMBOL (scm_system_error_key, "system-error"); void scm_syserror (const char *subr) { - SCM err = scm_from_int (SCM_I_ERRNO ()); + SCM err = scm_from_int (errno); /* It could be that we're getting here because the syscall was interrupted by a signal. In that case a signal handler might have |