[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-123-g95643
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-123-g9564385 |
Date: |
Thu, 16 Jun 2011 22:21:05 +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=95643853d75f2dfe6209a2702ebb58248d606049
The branch, stable-2.0 has been updated
via 95643853d75f2dfe6209a2702ebb58248d606049 (commit)
from 284019a2a5cfd7c7734701671f6a1776f11211eb (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 95643853d75f2dfe6209a2702ebb58248d606049
Author: Andy Wingo <address@hidden>
Date: Fri Jun 17 00:20:56 2011 +0200
remove win32-dirent.[ch]
* libguile/win32-dirent.c:
* libguile/win32-dirent.h: Remove these files. MinGW has opendir and
readdir support, I hear.
* configure.ac:
* libguile/filesys.c:
* libguile/Makefile.am: Adapt.
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 1 -
libguile/Makefile.am | 4 +-
libguile/filesys.c | 6 +--
libguile/win32-dirent.c | 133 -----------------------------------------------
libguile/win32-dirent.h | 65 -----------------------
5 files changed, 3 insertions(+), 206 deletions(-)
delete mode 100644 libguile/win32-dirent.c
delete mode 100644 libguile/win32-dirent.h
diff --git a/configure.ac b/configure.ac
index 3f820bf..682a9c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -716,7 +716,6 @@ case $host in
[Define if you have the <winsock2.h> header file.])])
AC_CHECK_LIB(ws2_32, main)
AC_LIBOBJ([win32-uname])
- AC_LIBOBJ([win32-dirent])
if test "$enable_networking" = yes ; then
AC_LIBOBJ([win32-socket])
fi
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 9cc1434..e69a155 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -433,7 +433,7 @@ address@hidden@_la_SOURCES = _scm.h \
dynl.c regex-posix.c \
posix.c net_db.c socket.c \
debug-malloc.c mkstemp.c \
- win32-uname.c win32-dirent.c win32-socket.c \
+ win32-uname.c win32-socket.c \
locale-categories.h
## delete guile-snarf.awk from the installation bindir, in case it's
@@ -450,7 +450,7 @@ noinst_HEADERS = conv-integer.i.c conv-uinteger.i.c
\
ieee-754.h \
srfi-14.i.c \
quicksort.i.c \
- win32-uname.h win32-dirent.h win32-socket.h \
+ win32-uname.h win32-socket.h \
private-gc.h private-options.h
# vm instructions
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 2429e80..86287a1 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -97,11 +97,7 @@
#endif
-#if defined (__MINGW32__) || defined (_MSC_VER) || defined (__BORLANDC__)
-# include "win32-dirent.h"
-# define NAMLEN(dirent) strlen((dirent)->d_name)
-/* The following bits are per AC_HEADER_DIRENT doco in the autoconf manual */
-#elif HAVE_DIRENT_H
+#if HAVE_DIRENT_H
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
#else
diff --git a/libguile/win32-dirent.c b/libguile/win32-dirent.c
deleted file mode 100644
index de170c7..0000000
--- a/libguile/win32-dirent.c
+++ /dev/null
@@ -1,133 +0,0 @@
-/* Copyright (C) 2001, 2006, 2008 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
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "libguile/__scm.h"
-
-#include <windows.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "win32-dirent.h"
-
-DIR *
-opendir (const char * name)
-{
- DIR *dir;
- HANDLE hnd;
- char *file;
- WIN32_FIND_DATA find;
-
- if (!name || !*name)
- return NULL;
- file = malloc (strlen (name) + 3);
- strcpy (file, name);
- if (file[strlen (name) - 1] != '/' && file[strlen (name) - 1] != '\\')
- strcat (file, "/*");
- else
- strcat (file, "*");
-
- if ((hnd = FindFirstFile (file, &find)) == INVALID_HANDLE_VALUE)
- {
- free (file);
- return NULL;
- }
-
- dir = malloc (sizeof (DIR));
- dir->mask = file;
- dir->fd = (int) hnd;
- dir->data = malloc (sizeof (WIN32_FIND_DATA));
- dir->allocation = sizeof (WIN32_FIND_DATA);
- dir->size = dir->allocation;
- dir->filepos = 0;
- memcpy (dir->data, &find, sizeof (WIN32_FIND_DATA));
- return dir;
-}
-
-struct dirent *
-readdir (DIR * dir)
-{
- static struct dirent entry;
- WIN32_FIND_DATA *find;
-
- entry.d_ino = 0;
- entry.d_type = 0;
- find = (WIN32_FIND_DATA *) dir->data;
-
- if (dir->filepos)
- {
- if (!FindNextFile ((HANDLE) dir->fd, find))
- return NULL;
- }
-
- entry.d_off = dir->filepos;
- strncpy (entry.d_name, find->cFileName, sizeof (entry.d_name));
- entry.d_reclen = strlen (find->cFileName);
- dir->filepos++;
- return &entry;
-}
-
-int
-closedir (DIR * dir)
-{
- HANDLE hnd = (HANDLE) dir->fd;
- free (dir->data);
- free (dir->mask);
- free (dir);
- return FindClose (hnd) ? 0 : -1;
-}
-
-void
-rewinddir (DIR * dir)
-{
- HANDLE hnd = (HANDLE) dir->fd;
- WIN32_FIND_DATA *find = (WIN32_FIND_DATA *) dir->data;
-
- FindClose (hnd);
- hnd = FindFirstFile (dir->mask, find);
- dir->fd = (int) hnd;
- dir->filepos = 0;
-}
-
-void
-seekdir (DIR * dir, off_t offset)
-{
- off_t n;
-
- rewinddir (dir);
- for (n = 0; n < offset; n++)
- {
- if (FindNextFile ((HANDLE) dir->fd, (WIN32_FIND_DATA *) dir->data))
- dir->filepos++;
- }
-}
-
-off_t
-telldir (DIR * dir)
-{
- return dir->filepos;
-}
-
-int
-dirfd (DIR * dir)
-{
- return dir->fd;
-}
diff --git a/libguile/win32-dirent.h b/libguile/win32-dirent.h
deleted file mode 100644
index 578db49..0000000
--- a/libguile/win32-dirent.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* classes: h_files */
-
-#ifndef SCM_WIN32_DIRENT_H
-#define SCM_WIN32_DIRENT_H
-
-/* Copyright (C) 2001, 2006 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
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-/* Directory stream type.
- The miscellaneous Unix `readdir' implementations read directory data
- into a buffer and return `struct dirent *' pointers into it. */
-
-#include <sys/types.h>
-
-struct dirstream
-{
- int fd; /* File descriptor. */
- char *data; /* Directory block. */
- size_t allocation; /* Space allocated for the block. */
- size_t size; /* Total valid data in the block. */
- size_t offset; /* Current offset into the block. */
- off_t filepos; /* Position of next entry to read. */
- char *mask; /* Initial file mask. */
-};
-
-struct dirent
-{
- long d_ino;
- off_t d_off;
- unsigned short int d_reclen;
- unsigned char d_type;
- char d_name[256];
-};
-
-#define d_fileno d_ino /* Backwards compatibility. */
-
-/* This is the data type of directory stream objects.
- The actual structure is opaque to users. */
-
-typedef struct dirstream DIR;
-
-DIR * opendir (const char * name);
-struct dirent * readdir (DIR * dir);
-int closedir (DIR * dir);
-void rewinddir (DIR * dir);
-void seekdir (DIR * dir, off_t offset);
-off_t telldir (DIR * dir);
-int dirfd (DIR * dir);
-
-#endif /* SCM_WIN32_DIRENT_H */
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-123-g9564385,
Andy Wingo <=