guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-178-gaa599


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-178-gaa59904
Date: Sat, 09 Mar 2013 22:12:59 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=aa59904eaec70c95fa95960f98ba9cbc62010e8d

The branch, stable-2.0 has been updated
       via  aa59904eaec70c95fa95960f98ba9cbc62010e8d (commit)
       via  b7548cd2dc4ead3c0ad3d2fb5c9fc43d54e6ce8d (commit)
      from  6ab4de612510b7c8668f0b50388258392f25b157 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit aa59904eaec70c95fa95960f98ba9cbc62010e8d
Author: Andy Wingo <address@hidden>
Date:   Sat Mar 9 23:12:51 2013 +0100

    fix mingw issues with posix.c
    
    * libguile/posix.c (scm_execl, scm_execlp, scm_execle)
      (scm_open_process): Remove casts for ancient mingw.
      (scm_utime): If we fall back to utime, assert that flags is 0.
      (scm_getlogin): Rely on gnulib.

commit b7548cd2dc4ead3c0ad3d2fb5c9fc43d54e6ce8d
Author: Andy Wingo <address@hidden>
Date:   Sat Mar 9 23:09:36 2013 +0100

    add getlogin from gnulib
    
    * lib/Makefile.am:
    * lib/getlogin.c:
    * m4/getlogin.m4:
    * m4/gnulib-cache.m4: Add getlogin module.

-----------------------------------------------------------------------

Summary of changes:
 lib/Makefile.am             |   11 ++++++++++-
 lib/{btowc.c => getlogin.c} |   38 ++++++++++++++++++++------------------
 libguile/posix.c            |   42 ++++++++++--------------------------------
 m4/{pipe.m4 => getlogin.m4} |   11 +++++------
 m4/gnulib-cache.m4          |    3 ++-
 m4/gnulib-comp.m4           |    8 ++++++++
 6 files changed, 55 insertions(+), 58 deletions(-)
 copy lib/{btowc.c => getlogin.c} (57%)
 copy m4/{pipe.m4 => getlogin.m4} (67%)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index a0d857a..701cd12 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local 
--lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests 
--aux-dir=build-aux --lgpl=3 --no-conditional-dependencies --libtool 
--macro-prefix=gl --no-vc-files accept alignof alloca-opt announce-gen 
autobuild bind byteswap canonicalize-lgpl ceil clock-time close connect dirfd 
duplocale environ extensions flock floor fpieee frexp fstat full-read 
full-write func gendocs getaddrinfo getpeername getsockname getsockopt 
git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib 
iconv_open-utf inet_ntop inet_pton isinf isnan ldexp lib-symbol-versions 
lib-symbol-visibility libunistring listen localcharset locale log1p 
maintainer-makefile malloc-gnu malloca nl_langinfo nproc open pipe-posix pipe2 
putenv recv recvfrom regex rename select send sendto setenv setsockopt shutdown 
socket stat-time stdlib strftime striconveh string sys_stat times trunc verify 
vsnprintf warnings wchar
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local 
--lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests 
--aux-dir=build-aux --lgpl=3 --no-conditional-dependencies --libtool 
--macro-prefix=gl --no-vc-files accept alignof alloca-opt announce-gen 
autobuild bind byteswap canonicalize-lgpl ceil clock-time close connect dirfd 
duplocale environ extensions flock floor fpieee frexp fstat full-read 
full-write func gendocs getaddrinfo getlogin getpeername getsockname getsockopt 
git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib 
iconv_open-utf inet_ntop inet_pton isinf isnan ldexp lib-symbol-versions 
lib-symbol-visibility libunistring listen localcharset locale log1p 
maintainer-makefile malloc-gnu malloca nl_langinfo nproc open pipe-posix pipe2 
putenv recv recvfrom regex rename select send sendto setenv setsockopt shutdown 
socket stat-time stdlib strftime striconveh string sys_stat times trunc verify 
vsnprintf warnings wchar
 
 AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
 
@@ -577,6 +577,15 @@ EXTRA_libgnu_la_SOURCES += gai_strerror.c getaddrinfo.c
 
 ## end   gnulib module getaddrinfo
 
+## begin gnulib module getlogin
+
+
+EXTRA_DIST += getlogin.c
+
+EXTRA_libgnu_la_SOURCES += getlogin.c
+
+## end   gnulib module getlogin
+
 ## begin gnulib module getpeername
 
 
diff --git a/lib/btowc.c b/lib/getlogin.c
similarity index 57%
copy from lib/btowc.c
copy to lib/getlogin.c
index aca5742..ebe7c33 100644
--- a/lib/btowc.c
+++ b/lib/getlogin.c
@@ -1,6 +1,6 @@
-/* Convert unibyte character to wide character.
-   Copyright (C) 2008, 2010-2013 Free Software Foundation, Inc.
-   Written by Bruno Haible <address@hidden>, 2008.
+/* Provide a working getlogin for systems which lack it.
+
+   Copyright (C) 2010-2013 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -15,25 +15,27 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* Written by Bruno Haible, 2010.  */
+
 #include <config.h>
 
 /* Specification.  */
-#include <wchar.h>
+#include <unistd.h>
 
-#include <stdio.h>
-#include <stdlib.h>
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
 
-wint_t
-btowc (int c)
+char *
+getlogin (void)
 {
-  if (c != EOF)
-    {
-      char buf[1];
-      wchar_t wc;
-
-      buf[0] = c;
-      if (mbtowc (&wc, buf, 1) >= 0)
-        return wc;
-    }
-  return WEOF;
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+  static char login_name[1024];
+  DWORD sz = sizeof (login_name);
+
+  if (GetUserName (login_name, &sz))
+    return login_name;
+#endif
+  return NULL;
 }
diff --git a/libguile/posix.c b/libguile/posix.c
index e7a3da7..be4714b 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -1135,12 +1135,7 @@ SCM_DEFINE (scm_execl, "execl", 1, 0, 1,
 
   exec_argv = scm_i_allocate_string_pointers (args);
 
-  execv (exec_file,
-#ifdef __MINGW32__
-         /* extra "const" in mingw formals, provokes warning from gcc */
-         (const char * const *)
-#endif
-         exec_argv);
+  execv (exec_file, exec_argv);
   SCM_SYSERROR;
 
   /* not reached.  */
@@ -1169,12 +1164,7 @@ SCM_DEFINE (scm_execlp, "execlp", 1, 0, 1,
 
   exec_argv = scm_i_allocate_string_pointers (args);
 
-  execvp (exec_file,
-#ifdef __MINGW32__
-          /* extra "const" in mingw formals, provokes warning from gcc */
-          (const char * const *)
-#endif
-          exec_argv);
+  execvp (exec_file, exec_argv);
   SCM_SYSERROR;
 
   /* not reached.  */
@@ -1208,17 +1198,7 @@ SCM_DEFINE (scm_execle, "execle", 2, 0, 1,
   exec_argv = scm_i_allocate_string_pointers (args);
   exec_env = scm_i_allocate_string_pointers (env);
 
-  execve (exec_file,
-#ifdef __MINGW32__
-          /* extra "const" in mingw formals, provokes warning from gcc */
-          (const char * const *)
-#endif
-          exec_argv,
-#ifdef __MINGW32__
-          /* extra "const" in mingw formals, provokes warning from gcc */
-          (const char * const *)
-#endif
-          exec_env);
+  execve (exec_file, exec_argv, exec_env);
   SCM_SYSERROR;
 
   /* not reached.  */
@@ -1418,12 +1398,7 @@ scm_open_process (SCM mode, SCM prog, SCM args)
       close (err);
     }
 
-  execvp (exec_file,
-#ifdef __MINGW32__
-          /* extra "const" in mingw formals, provokes warning from gcc */
-          (const char * const *)
-#endif
-          exec_argv);
+  execvp (exec_file, exec_argv);
 
   /* The exec failed!  There is nothing sensible to do.  */
   if (err > 0)
@@ -1624,6 +1599,12 @@ SCM_DEFINE (scm_utime, "utime", 1, 5, 0,
     struct utimbuf utm;
     utm.actime = atim_sec;
     utm.modtime = mtim_sec;
+    /* Silence warnings.  */
+    (void) atim_nsec;
+    (void) mtim_nsec;
+
+    if (f != 0)
+      scm_out_of_range(FUNC_NAME, flags);
 
     STRING_SYSCALL (pathname, c_pathname,
                     rv = utime (c_pathname, &utm));
@@ -1908,8 +1889,6 @@ SCM_DEFINE (scm_chroot, "chroot", 1, 0, 0,
 #undef FUNC_NAME
 #endif /* HAVE_CHROOT */
 
-
-#if defined (HAVE_GETLOGIN)
 SCM_DEFINE (scm_getlogin, "getlogin", 0, 0, 0, 
             (void),
            "Return a string containing the name of the user logged in on\n"
@@ -1925,7 +1904,6 @@ SCM_DEFINE (scm_getlogin, "getlogin", 0, 0, 0,
   return scm_from_locale_string (p);
 }
 #undef FUNC_NAME
-#endif /* HAVE_GETLOGIN */
 
 #if HAVE_GETPRIORITY
 SCM_DEFINE (scm_getpriority, "getpriority", 2, 0, 0, 
diff --git a/m4/pipe.m4 b/m4/getlogin.m4
similarity index 67%
copy from m4/pipe.m4
copy to m4/getlogin.m4
index 5831283..9b3f3cd 100644
--- a/m4/pipe.m4
+++ b/m4/getlogin.m4
@@ -1,15 +1,14 @@
-# pipe.m4 serial 2
+# getlogin.m4 serial 3
 dnl Copyright (C) 2010-2013 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
-AC_DEFUN([gl_FUNC_PIPE],
+AC_DEFUN([gl_FUNC_GETLOGIN],
 [
   AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
-
-  AC_CHECK_FUNCS_ONCE([pipe])
-  if test $ac_cv_func_pipe != yes; then
-    HAVE_PIPE=0
+  AC_CHECK_FUNCS_ONCE([getlogin])
+  if test $ac_cv_func_getlogin = no; then
+    HAVE_GETLOGIN=0
   fi
 ])
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index 1543626..99ace9a 100644
--- a/m4/gnulib-cache.m4
+++ b/m4/gnulib-cache.m4
@@ -27,7 +27,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnu 
--source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests 
--aux-dir=build-aux --lgpl=3 --no-conditional-dependencies --libtool 
--macro-prefix=gl --no-vc-files accept alignof alloca-opt announce-gen 
autobuild bind byteswap canonicalize-lgpl ceil clock-time close connect dirfd 
duplocale environ extensions flock floor fpieee frexp fstat full-read 
full-write func gendocs getaddrinfo getpeername getsockname getsockopt 
git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib 
iconv_open-utf inet_ntop inet_pton isinf isnan ldexp lib-symbol-versions 
lib-symbol-visibility libunistring listen localcharset locale log1p 
maintainer-makefile malloc-gnu malloca nl_langinfo nproc open pipe-posix pipe2 
putenv recv recvfrom regex rename select send sendto setenv setsockopt shutdown 
socket stat-time stdlib strftime striconveh string sys_stat times trunc verify 
vsnprintf warnings wchar
+#   gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnu 
--source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests 
--aux-dir=build-aux --lgpl=3 --no-conditional-dependencies --libtool 
--macro-prefix=gl --no-vc-files accept alignof alloca-opt announce-gen 
autobuild bind byteswap canonicalize-lgpl ceil clock-time close connect dirfd 
duplocale environ extensions flock floor fpieee frexp fstat full-read 
full-write func gendocs getaddrinfo getlogin getpeername getsockname getsockopt 
git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib 
iconv_open-utf inet_ntop inet_pton isinf isnan ldexp lib-symbol-versions 
lib-symbol-visibility libunistring listen localcharset locale log1p 
maintainer-makefile malloc-gnu malloca nl_langinfo nproc open pipe-posix pipe2 
putenv recv recvfrom regex rename select send sendto setenv setsockopt shutdown 
socket stat-time stdlib strftime striconveh string sys_stat times trunc verify 
vsnprintf warnings wchar
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([gnulib-local])
@@ -58,6 +58,7 @@ gl_MODULES([
   func
   gendocs
   getaddrinfo
+  getlogin
   getpeername
   getsockname
   getsockopt
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 3a8172b..0d0aa7b 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -87,6 +87,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module func:
   # Code from module gendocs:
   # Code from module getaddrinfo:
+  # Code from module getlogin:
   # Code from module getpeername:
   # Code from module getsockname:
   # Code from module getsockopt:
@@ -353,6 +354,11 @@ AC_SUBST([LTALLOCA])
     AC_LIBOBJ([gai_strerror])
   fi
   gl_NETDB_MODULE_INDICATOR([getaddrinfo])
+  gl_FUNC_GETLOGIN
+  if test $HAVE_GETLOGIN = 0; then
+    AC_LIBOBJ([getlogin])
+  fi
+  gl_UNISTD_MODULE_INDICATOR([getlogin])
   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
   if test "$ac_cv_header_winsock2_h" = yes; then
     AC_LIBOBJ([getpeername])
@@ -944,6 +950,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/full-write.h
   lib/gai_strerror.c
   lib/getaddrinfo.c
+  lib/getlogin.c
   lib/getpeername.c
   lib/getsockname.c
   lib/getsockopt.c
@@ -1131,6 +1138,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/fstat.m4
   m4/func.m4
   m4/getaddrinfo.m4
+  m4/getlogin.m4
   m4/glibc21.m4
   m4/gnulib-common.m4
   m4/hostent.m4


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]