Re: macosx linking fails: _freea referenced from: _rpl_realpath

2019-06-25 Thread Sam Steingold
> * Bruno Haible  [2019-06-25 19:11:03 +0200]:
>
>> $ find . -name \*alloc\*.o
>> ./lib/allocator.o
>> ./src/alloc.o
>
> Oh, this is surprising.

aha!

I re-run gnulib-tool and it fixed it.
(alas, emacs maintainers pushed the changes before me ;-)

thanks and sorry about bothering you!

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
http://iris.org.il http://no2bds.org http://mideasttruth.com
Do not worry about which side your bread is buttered on: you eat BOTH sides.



Re: macosx linking fails: _freea referenced from: _rpl_realpath

2019-06-25 Thread Sam Steingold
> * Bruno Haible  [2019-06-25 17:00:58 +0200]:
>
> Sam Steingold wrote:
>> I get this error when linking Emacs:
>> 
>> --8<---cut here---start->8---
>>   CCLD temacs
>> Undefined symbols for architecture x86_64:
>>   "_freea", referenced from:
>>   _rpl_realpath in libgnu.a(canonicalize-lgpl.o)
>> ld: symbol(s) not found for architecture x86_64
>> clang: error: linker command failed with exit code 1 (use -v to see 
>> invocation)
>> make[1]: *** [temacs] Error 1
>> --8<---cut here---end--->8---
>> 
>> I also reported this as https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36356
>> (https://lists.gnu.org/archive/html/bug-gnu-emacs/2019-06/msg01229.html)
>
> 1) After your latest "git pull" from emacs, have you done a "make distclean"
>followed by a reconfiguration?

no, I did "make bootstrap" which re-runs configure

> If you don't remember: Does the issue persist after a "make distclean"
> followed by a reconfiguration?

yes, I just did "make distclean; ../configure ...; make bootstrap" and
got the above error.

> 2) Which symbols does
>   nm lib/malloca.o
> show?

--8<---cut here---start->8---
$ find . -name \*alloc\*.o
./lib/allocator.o
./src/alloc.o
$ nm ./lib/allocator.o
 U _free
 U _malloc
 U _realloc
 S _stdlib_allocator
--8<---cut here---end--->8---



> If, as I would expect, it lists '_mmalloca' but not '_freea', it means
> that the macro HAVE_ALLOCA was defined in the compilation unit
> canonicalize-lgpl.c but not defined in the compilation unit malloca.c.
> Can you investigate why this is so? (Where is HAVE_ALLOCA defined? In
> config.h, I would guess. It is undefined somewhere? I would guess no.

right:
--8<---cut here---start->8---
./src/config.h:#define HAVE_ALLOCA 1
./src/config.h:#define HAVE_ALLOCA_H 1
--8<---cut here---end--->8---

> What are the preprocessor symbols that are defined [use "$CC -E
> -dM"] in the compilation unit canonicalize-lgpl.c, versus the
> compilation unit malloca.c?

--8<---cut here---start->8---
$ gcc -Isrc -I../src -E -dM ../lib/malloca.c > m
$ gcc -Isrc -I../src -E -dM ../lib/canonicalize-lgpl.c > c
$ diff -u m c|grep -i ^[-+].*alloc
+#define MAXALLOCSAVE (2 * CLBYTES)
+#define _PC_ALLOC_SIZE_MIN 16
$ diff -u m c|grep -i ^[-+].*free

--8<---cut here---end--->8---

However, I see no malloca.o in lib (where canonicalize-lgpl.o is found)
I wonder if there is some magic autoconf place where canonicalize-lgpl
is mentioned but malloca is not.

Thanks!

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
http://think-israel.org http://www.memritv.org https://jihadwatch.org
He who laughs last thinks slowest.



macosx linking fails: _freea referenced from: _rpl_realpath

2019-06-25 Thread Sam Steingold
Hi,
I get this error when linking Emacs:

--8<---cut here---start->8---
  CCLD temacs
Undefined symbols for architecture x86_64:
  "_freea", referenced from:
  _rpl_realpath in libgnu.a(canonicalize-lgpl.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [temacs] Error 1
--8<---cut here---end--->8---

I also reported this as https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36356
(https://lists.gnu.org/archive/html/bug-gnu-emacs/2019-06/msg01229.html)

Since this involves libgnu, I was wondering if someone here might have
an insight.

Thanks!

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
http://americancensorship.org http://mideasttruth.com
XML is like violence. If it doesn't solve the problem, use more.



no-c++.m4: bug fix: egrep: repetition-operator operand invalid

2017-12-05 Thread Sam Steingold
Hi,

On Darwin (Mac OS) the gt_NO_CXX test fails because "Is g++" is not a
valid repetition-operator operand.

The attached patch fixes the problem.

>From d5d949b838c7cf4adb0e6e615795003ac7b0f1c3 Mon Sep 17 00:00:00 2001
From: Sam Steingold 
Date: Tue, 5 Dec 2017 11:02:33 -0500
Subject: [PATCH] Avoid the "egrep: repetition-operator operand invalid" error
 on Darwin

---
 m4/no-c++.m4 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/m4/no-c++.m4 b/m4/no-c++.m4
index ed06b22b6..b2fa0184f 100644
--- a/m4/no-c++.m4
+++ b/m4/no-c++.m4
@@ -7,14 +7,14 @@ dnl with or without modifications, as long as this notice is preserved.
 # Support for C source files that cannot be compiled by a C++ compiler.
 # Set NO_CXX to the C++ compiler flags needed to request C mode instead of
 # C++ mode.
-# So far only g++ is supported.
+# So far only g++ and clang++ are supported.
 
 AC_DEFUN([gt_NO_CXX],
 [
   NO_CXX=
-  AC_EGREP_CPP([Is g++], [
+  AC_EGREP_CPP([Is c plus plus], [
 #if defined __GNUC__ && defined __cplusplus
-  Is g++
+  Is c plus plus
 #endif
 ],
 [NO_CXX="-x c"])
-- 
2.15.1


Thanks.

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504
http://steingoldpsychology.com http://www.childpsy.net
https://ffii.org http://no2bds.org https://jihadwatch.org http://camera.org
The world is coming to an end.  Please log off.


fnmatch does not compile with c++ (clang)

2016-08-29 Thread Sam Steingold
Hi,
fnmatch cannot be compiled using c++ on mac os x:

--8<---cut here---start->8---
g++ -DHAVE_CONFIG_H -I. -I../../src/gllib -I..  -I../intl 
-I/usr/local/include -I/usr/local/opt/readline/include  -W -Wswitch -Wcomment 
-Wpointer-arith -Wreturn-type -g -O0 -DDEBUG_OS_ERROR -DDEBUG_SPVW 
-DDEBUG_BYTECODE -DSAFETY=3 -DDEBUG_GCSAFETY -DUNIX_BINARY_DISTRIB 
-DENABLE_UNICODE -DNO_GETTEXT   -MT fnmatch.o -MD -MP -MF $depbase.Tpo -c -o 
fnmatch.o ../../src/gllib/fnmatch.c &&\
mv -f $depbase.Tpo $depbase.Po
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is 
deprecated
In file included from ../../src/gllib/fnmatch.c:172:
../../src/gllib/fnmatch_loop.c:152:20: error: assigning to 'const char *' from 
incompatible type 'void *'
  endp = MEMCHR (n, (flags & FNM_FILE_NAME) ? L_('/') : L_('\0'),
   ^ 
../../src/gllib/fnmatch_loop.c:205:27: error: expected unqualified-id
register bool not;
  ^
../../src/gllib/fnmatch_loop.c:222:17: error: expected expression
not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^')));
^
../../src/gllib/fnmatch_loop.c:223:20: error: expected expression
if (not)
   ^
../../src/gllib/fnmatch_loop.c:864:21: error: expected expression
if (!not)
^
../../src/gllib/fnmatch_loop.c:937:20: error: expected expression
if (not)
   ^
../../src/gllib/fnmatch_loop.c:269:29: error: cannot jump from this goto 
statement to its label
goto normal_bracket;
^
../../src/gllib/fnmatch_loop.c:424:26: note: jump bypasses variable 
initialization
bool is_range = false;
 ^
../../src/gllib/fnmatch_loop.c:238:21: error: cannot jump from this goto 
statement to its label
goto normal_bracket;
^
../../src/gllib/fnmatch_loop.c:424:26: note: jump bypasses variable 
initialization
bool is_range = false;
 ^
In file included from ../../src/gllib/fnmatch.c:269:
../../src/gllib/fnmatch_loop.c:205:27: error: expected unqualified-id
register bool not;
  ^
../../src/gllib/fnmatch_loop.c:222:17: error: expected expression
not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^')));
^
../../src/gllib/fnmatch_loop.c:223:20: error: expected expression
if (not)
   ^
../../src/gllib/fnmatch_loop.c:864:21: error: expected expression
if (!not)
^
../../src/gllib/fnmatch_loop.c:937:20: error: expected expression
if (not)
   ^
../../src/gllib/fnmatch_loop.c:269:29: error: cannot jump from this goto 
statement to its label
goto normal_bracket;
^
../../src/gllib/fnmatch_loop.c:424:26: note: jump bypasses variable 
initialization
bool is_range = false;
 ^
../../src/gllib/fnmatch_loop.c:238:21: error: cannot jump from this goto 
statement to its label
goto normal_bracket;
^
../../src/gllib/fnmatch_loop.c:424:26: note: jump bypasses variable 
initialization
bool is_range = false;
 ^
../../src/gllib/fnmatch.c:313:28: error: assigning to 'wchar_t *' from 
incompatible type 'void *'
  wpattern = malloc (totsize * sizeof (wchar_t));
   ^ ~~~~~~~
16 errors generated.
make[3]: *** [fnmatch.o] Error 1
--8<---cut here---end--->8---

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1404
http://www.childpsy.net/ http://camera.org http://www.memritv.org
http://iris.org.il http://dhimmi.org http://ffii.org
-Nervous?  -Yes!  -First time?  -No, I've been nervous before!



Re: _GL_UNISTD_H & _GL_INCLUDING_WINSOCK2_H

2011-08-25 Thread Sam Steingold
> * Sam Steingold  [2011-08-25 12:09:34 -0400]:
>
> .../modules/rawsock/rawsock.c:691:3: warning: implicit declaration of
> function `close_used_without_including_unistd_h'

the immediate cause appears to be that I include unistd.h after some
other headers (specifically,

#include 
#include 
#include 
#include 
#include 

) and then it bails out.
are you sure this is right?!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://jihadwatch.org http://ffii.org http://mideasttruth.com
http://iris.org.il http://truepeace.org http://www.PetitionOnline.com/tap12009/
If you're being passed on the right, you're in the wrong lane.



_GL_UNISTD_H & _GL_INCLUDING_WINSOCK2_H

2011-08-25 Thread Sam Steingold
Hi,
gllib/unistd.h says:

#if 1 && 1 \
  && !defined _GL_INCLUDING_WINSOCK2_H
# define _GL_INCLUDING_WINSOCK2_H
# include 
# undef _GL_INCLUDING_WINSOCK2_H
#endif

#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
#define _GL_UNISTD_H

so when compiling with i686-pc-mingw32-gcc _GL_INCLUDING_WINSOCK2_H is
undef'ed and so _GL_UNISTD_H is __NOT__ defined thus I get

.../modules/rawsock/rawsock.c:691:3: warning: implicit declaration of function 
`close_used_without_including_unistd_h'

why?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://openvotingconsortium.org http://truepeace.org http://www.memritv.org
http://mideasttruth.com http://ffii.org http://iris.org.il http://camera.org
What garlic is to food, insanity is to art.



Re: canonicalize_file_name should support win32 shortcuts

2011-08-23 Thread Sam Steingold
> * Eric Blake  [2011-08-23 11:47:57 -0600]:
>
> On 08/23/2011 11:31 AM, Sam Steingold wrote:
>>
>>> Maybe we should rename the canonicalize module to instead be
>>> canonicalize_filename_mode, since it does _not_ provide canonicalize()
>>> (well, canonicalize_filename_mode(file, CAN_EXISTING) is identical to
>>> canonicalize(), but the other modes are what introduce the baggage).
>>
>> yes, I think there should be a very minimalist realpath module whose job
>> is to provide the posix realpath with minimum dependencies (well,
>> minimum dependencies is my constant mantra, applicable to extension
>> modules just as much as to portability ones).
>
> canonicalize-lgpl _is_ the minimalize realpath()/canonicalize()
> module.

http://article.gmane.org/gmane.comp.lib.gnulib.bugs:26452

Indeed, much better:

$ wc `hg st -u | cut -c2-`
  378  1324 10439 src/gllib/canonicalize-lgpl.c
   53   261  2011 src/gllib/dosname.h
   91   490  3191 src/gllib/lstat.c
   48   227  1525 src/gllib/pathmax.h
   74   347  2355 src/gllib/readlink.c
  105   458  3425 src/gllib/stat.c
  658  2489 18324 src/gllib/sys_stat.in.h
  249  1093  9223 src/gllib/time.in.h
   94   274  2986 src/glm4/canonicalize.m4
   38   212  1621 src/glm4/double-slash-root.m4
   69   274  2652 src/glm4/lstat.m4
   1355   441 src/glm4/pathmax.m4
   62   210  2218 src/glm4/readlink.m4
   66   250  2436 src/glm4/stat.m4
   82   259  3278 src/glm4/sys_stat_h.m4
  109   305  4247 src/glm4/time_h.m4
 2189  8528 70372 total

Still I get 2000+ lines to replace 200- lines I have.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://www.memritv.org http://mideasttruth.com
http://openvotingconsortium.org http://ffii.org http://dhimmi.com
Why do you never call me back after I scream that I will never talk to you 
again?!



Re: canonicalize_file_name should support win32 shortcuts

2011-08-23 Thread Sam Steingold
> * Eric Blake  [2011-08-23 10:35:52 -0600]:
>
> On 08/23/2011 10:28 AM, Sam Steingold wrote:
>>> Does Hurd have SYMLOOP_MAX?  If so, then yes, that would be a reasonable
>>> change.  If not, then how do you propose implementing canonicalize on
>>> Hurd, without imposing a limit not already present by the system?
>>
>> Are you saying that you want to replace realpath on a GNU system?
>
> Have you read the canonicalize module?  It does _not_ provide
> canonicalize() (which is a thin wrapper around realpath(), but which is
> inherently limited in what it can do), but a broader API
> canonicalize_filename_mode(const char *name, canonicalize_mode_t mode),
> where the extra argument mode allows you to canonicalize whether a file
> name can be created (all its parents exist), or even to canonicalize
> what exists but leave the suffix intact (multiple parents still need
> creation).  That is, there is no libc functions that do what we want in
> a single blow, not even realpath(), so we have to do a lot of work to
> get the extended functionality, all of which is useful in coreutils'
> realpath(1).

I see. So, the canonicalize module is an "extension", not a
"portability" module, i.e., it offers new non-posix functionality
instead of making sure that the weird platforms conform to posix.
Thanks for explaining.

> ... enhanced with gpl code to parse symlinks left by cygwin even when
> running as a non-cygwin native windows program.  But why?  Windows
> doesn't have symlinks, and cygwin is free to change its symlink
> emulation in the future.  Does it really make sense to teach
> non-cygwin programs about cygwin file formats?

First of all, newer windows do have symlinks.
Second, canonicalize is already an extension module, so why not extend
it to work well with a popular extension of a popular platform? :-)

> Maybe we should rename the canonicalize module to instead be
> canonicalize_filename_mode, since it does _not_ provide canonicalize()
> (well, canonicalize_filename_mode(file, CAN_EXISTING) is identical to
> canonicalize(), but the other modes are what introduce the baggage).

yes, I think there should be a very minimalist realpath module whose job
is to provide the posix realpath with minimum dependencies (well,
minimum dependencies is my constant mantra, applicable to extension
modules just as much as to portability ones).

Thanks.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://thereligionofpeace.com http://camera.org
http://dhimmi.com http://memri.org http://truepeace.org
Be sure brain is in gear before engaging mouth.



Re: canonicalize_file_name should support win32 shortcuts

2011-08-23 Thread Sam Steingold
> * Eric Blake  [2011-08-23 08:46:00 -0600]:
>
> On 08/23/2011 08:41 AM, Sam Steingold wrote:
>>> * Eric Blake  [2011-08-23 08:03:02 -0600]:
>>>
>>> On 08/23/2011 07:56 AM, Sam Steingold wrote:
>>>> Let me reiterate that the size of canonicalize is plain absurd:
>>>> <https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00143.html>.
>>>> 150+ files to implement a single function which takes ~160 lines of C code.
>>>> These files includes things like hash.c and fchownat.c (why?!)
>>>
>>> hash.c in order to properly detect ELOOP, which must be done as part of
>>> an unlimited-depth link following algorithm.  (If we didn't have the GNU
>>> mantra of no arbitrary limits, then we could declare ELOOP at
>>> SYMLOOP_MAX instead.)
>>
>> ELOOP at SYMLOOP_MAX sounds good to me.
>
> Does Hurd have SYMLOOP_MAX?  If so, then yes, that would be a reasonable
> change.  If not, then how do you propose implementing canonicalize on
> Hurd, without imposing a limit not already present by the system?

Are you saying that you want to replace realpath on a GNU system?
Are you trying to be holier than the pope?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://camera.org http://jihadwatch.org http://memri.org
http://palestinefacts.org http://thereligionofpeace.com http://iris.org.il
main(a){a="main(a){a=%c%s%c;printf(a,34,a,34);}";printf(a,34,a,34);}



Re: canonicalize_file_name should support win32 shortcuts

2011-08-23 Thread Sam Steingold
> * Eric Blake  [2011-08-23 08:03:02 -0600]:
>
> On 08/23/2011 07:56 AM, Sam Steingold wrote:
>> Let me reiterate that the size of canonicalize is plain absurd:
>> <https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00143.html>.
>> 150+ files to implement a single function which takes ~160 lines of C code.
>> These files includes things like hash.c and fchownat.c (why?!)
>
> hash.c in order to properly detect ELOOP, which must be done as part of
> an unlimited-depth link following algorithm.  (If we didn't have the GNU
> mantra of no arbitrary limits, then we could declare ELOOP at
> SYMLOOP_MAX instead.)

ELOOP at SYMLOOP_MAX sounds good to me.
Please note that gnulib's mandate (as far as _I_ understand it) is
to turn a random system into a POSIX system, not a GNU system.
Please provide a separate module when you want to follow the GNU mantra,
like you do with fnmatch.

Thanks!

> fchownat.c because the openat module has too many functions.

I would say that all the "f*" (i.e., using FILE*) files are an overkill.

> Anyone willing to split openat into multiple modules, one per
> function, more like other gnulib modules?

Please!

>> as well as __BOTH__ malloc.c and xmalloc.c.
>
> Depending on xmalloc is probably overkill - having a version of
> canonicalize that returns NULL with ENOMEM instead of abort()ing would
> indeed be nicer.  Anyone willing to contribute patches to break that
> part of the dependency chain()

Please!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://pmw.org.il http://iris.org.il http://ffii.org http://honestreporting.com
http://www.PetitionOnline.com/tap12009/ http://openvotingconsortium.org
(let((a'(list'let(list(list'a(list'quote a)))a)))`(let((a(quote ,a))),a))



Re: canonicalize_file_name should support win32 shortcuts

2011-08-23 Thread Sam Steingold
> * Bruno Haible  [2011-08-14 14:51:55 +0200]:
>
> Sam, if 'canonicalize' gets this support, would you be willing to use
> 'canonicalize'

Let me reiterate that the size of canonicalize is plain absurd:
<https://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00143.html>.
150+ files to implement a single function which takes ~160 lines of C code.
These files includes things like hash.c and fchownat.c (why?!)
as well as __BOTH__ malloc.c and xmalloc.c.

> instead of 'canonicalize-lgpl' in clisp?

For the record, I am _not_ using `canonicalize-lgpl'.

I have been reluctant to pull this code bloat into clisp so far,
but if it does provide a clear advantage of handling cygwin symlinks on
pure win32 builds, I will reconsider.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://openvotingconsortium.org http://www.PetitionOnline.com/tap12009/
http://www.memritv.org http://memri.org http://camera.org
Single tasking: Just Say No.



Re: canonicalize_file_name should support win32 shortcuts

2011-08-14 Thread Sam Steingold
On Sun, Aug 14, 2011 at 8:51 AM, Bruno Haible  wrote:
>
> Sam, if 'canonicalize' gets this support, would you be willing to use
> 'canonicalize' instead of 'canonicalize-lgpl' in clisp?

yes.

-- 
Sam Steingold <http://sds.podval.org>



Re: canonicalize_file_name should support win32 shortcuts

2011-08-13 Thread Sam Steingold
Hi Bruno,

On Sat, Aug 13, 2011 at 1:52 PM, Bruno Haible  wrote:
>
> The feature request is a bit odd, because it mixes the notion of
> "native Windows" and Cygwin. Cygwin is a platform that runs inside Windows.
> When you build mingw programs, and redistribute them, they are meant to
> run in a native Windows environment, in which no Cygwin symlinks exist.

I have not seen a windows machine without cygwin for longer than it
took me to install it.
CLISP understands those "/cygdrive/c/autoexec.bat" pathnames just
fine, and understanding symlinks is just another step forward.

> Other non-Cygwin applications don't understand Cygwin symlinks either.

Emacs understands the cygdrive pathnames and I am sure it will
appreciate an opportunity to understand symlinks as well.

-- 
Sam Steingold <http://sds.podval.org>



rpl_socket on windows

2011-08-12 Thread Sam Steingold
with clisp built with the latest gnulib:
(defparameter *server* (socket-server))
- success, rpl_socket (domain=2, type=1, protocol=0) is called.
(socket-connect (socket-server-port *server*) "localhost" :timeout 0)
failure the same rpl_socket (domain=2, type=1, protocol=0) is called:
*** - POSIX library error 0: No error

[4]> (socket-connect (socket-server-port *server*) "localhost" :timeout 0)

Breakpoint 18, 0x0055ec4a in rpl_socket (domain=2, type=1, protocol=0)
at ../../src/gllib/w32sock.h:58
58errno = (err > 1 && err < 10025) ? err - 1 : err;
(gdb) s
0x00560f1d in gl_sockets_startup (version=257) at ../../src/gllib/w32sock.h:58
58errno = (err > 1 && err < 10025) ? err - 1 : err;
(gdb) finish
Run till exit from #0  0x00560f1d in gl_sockets_startup (version=257)
at ../../src/gllib/w32sock.h:58
0x0055ec56 in rpl_socket (domain=2, type=1, protocol=0)
at ../../src/gllib/w32sock.h:58
58errno = (err > 1 && err < 10025) ? err - 1 : err;
Value returned is $6 = 0
(gdb) s
0x004f571a in ANSIC_error () at ../src/lispbibl.d:14619
14619 if (!symbolp(obj))

for some reason gdb seems not to be working properly.
clisp (and gnulib) was compiled with i686-w64-mingw32-gcc.
CYGWIN_NT-5.2-WOW64 sds 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://camera.org http://jihadwatch.org http://mideasttruth.com
http://memri.org http://ffii.org http://honestreporting.com http://pmw.org.il
Heck is a place for people who don't believe in gosh.



Re: REPLACE_TOWLOWER='1'

2011-08-01 Thread Sam Steingold
> * Eric Blake  [2011-08-01 09:00:07 -0600]:
> On 08/01/2011 08:56 AM, Sam Steingold wrote:
>> why is tolower replaced on linux?
>
> Did you mean towlower rather than tolower?

towlower, sorry

> What does config.log say?

configure:29272: checking whether towlower is declared
configure:29272: gcc -c   conftest.c >&5
configure:29272: $? = 0
configure:29272: result: yes

| #define HAVE_DECL_TOWLOWER 1

ac_cv_have_decl_towlower=yes

REPLACE_TOWLOWER='1'

these are the only mentions of towlower in config.log

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://truepeace.org http://palestinefacts.org http://iris.org.il
http://ffii.org http://thereligionofpeace.com http://jihadwatch.org
20% of people do 80% of work; also 80% of people think they are in those 20%.



Re: top_srcdir in Makefile.am & Makefile.in

2011-08-01 Thread Sam Steingold
> * Bruno Haible  [2011-07-30 02:20:08 +0200]:
>
> Sam Steingold wrote:
>> clisp directory structure is:
>> clisp - top level; hand-written configure script (ask Bruno)
>> clisp/src - most sources, configure.in, configure, aclocal.m4
>> clisp/src/gllib, clisp/src/glm4 - imported from gnulib
>> clisp/src/build-aux - imported from many places, mostly gnulib
>
> So, in clisp, $(top_srcdir) ought to be clisp/src.

thanks.

> You can get in trouble here if you use fake configure.ac / configure
> file that are present at the moment 'automake' is run but are removed
> afterwards.

I get the exact same files if I run aclocal on clisp/src/configure.ac as
on clisp/configure.ac.

>> $ grep top_srcdir src/gllib/Makefile.am
>> appears to indicate that top_srcdir should point to clisp.
>
> Maybe this is related to this hack in clisp/Makefile.devel:
>
> src/gllib/Makefile.in : src/gllib/Makefile.am src/configure.in src/aclocal.m4
> cd src && automake gllib/Makefile && \
> sed -i -e 
> 's,$$(top_srcdir)/src/build-aux,$$(CLISP_LIBDIR)/build-aux,' \
>   -e 's,$$(top_srcdir)/$$cl_cv_clisp_libdir,$$(CLISP_LIBDIR),' \
> gllib/Makefile.in

you are out of date, the current hack is

src/gllib/Makefile.in : src/gllib/Makefile.am src/configure.in src/aclocal.m4
cd src && automake --gnits gllib/Makefile && \
        sed -i -e 's,$$(top_srcdir)/src/build-aux,$$(top_srcdir)/build-aux,' \
gllib/Makefile.in

(whose intent you should approve of)

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://pmw.org.il http://palestinefacts.org http://ffii.org
http://thereligionofpeace.com http://openvotingconsortium.org http://memri.org
The difference between theory and practice is that in theory there isn't any.



REPLACE_TOWLOWER='1'

2011-08-01 Thread Sam Steingold
why is tolower replaced on linux?
-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://iris.org.il http://palestinefacts.org http://honestreporting.com
http://thereligionofpeace.com http://www.PetitionOnline.com/tap12009/
Why use Windows, when there are Doors?



Re: top_srcdir in Makefile.am & Makefile.in

2011-07-29 Thread Sam Steingold
A related issue is this section of gllib/Makefile.in

$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
@for dep in $?; do \
  case '$(am__configure_deps)' in \
*$$dep*) \
  ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
  exit 1;; \
  esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gllib/Makefile'; \
$(am__cd) $(top_srcdir) && \
  $(AUTOMAKE) --gnits gllib/Makefile

the penultimate line must be

$(am__cd) $(top_srcdir)/src && \

how do I effect that?

> * Sam Steingold  [2011-07-29 14:16:46 -0400]:
>
> clisp directory structure is:
> clisp - top level; hand-written configure script (ask Bruno)
> clisp/src - most sources, configure.in, configure, aclocal.m4
> clisp/src/gllib, clisp/src/glm4 - imported from gnulib
> clisp/src/build-aux - imported from many places, mostly gnulib
>
> $ grep top_srcdir src/gllib/Makefile.am
> appears to indicate that top_srcdir should point to clisp.
> however,
> $ cd src && automake gllib/Makefile && cd ..
> $ grep top_srcdir src/gllib/Makefile.in
> has these:
> ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
> am__aclocal_m4_deps = $(top_srcdir)/configure.in
> depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
> echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gllib/Makefile'; \
>
> how come?!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://truepeace.org http://www.memritv.org http://memri.org http://iris.org.il
http://openvotingconsortium.org http://www.PetitionOnline.com/tap12009/
A clear conscience is usually the sign of a bad memory.



top_srcdir in Makefile.am & Makefile.in

2011-07-29 Thread Sam Steingold
Hi,
clisp directory structure is:
clisp - top level; hand-written configure script (ask Bruno)
clisp/src - most sources, configure.in, configure, aclocal.m4
clisp/src/gllib, clisp/src/glm4 - imported from gnulib
clisp/src/build-aux - imported from many places, mostly gnulib

$ grep top_srcdir src/gllib/Makefile.am
appears to indicate that top_srcdir should point to clisp.
however,
$ cd src && automake gllib/Makefile && cd ..
$ grep top_srcdir src/gllib/Makefile.in
has these:
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gllib/Makefile'; \

how come?!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://www.memritv.org http://honestreporting.com http://ffii.org
http://truepeace.org http://mideasttruth.com http://palestinefacts.org
Someone has changed your life.  Save? (y/n)



Re: regex.m4: how do I know that the included regex is used?

2011-07-29 Thread Sam Steingold
> * Bruno Haible  [2011-07-29 01:39:59 +0200]:
>
>> At any rate, if gnulib regex is included in libgnu.a, then regex.h
>> should be copied (or linked) to $(builddir) or $(builddir)/gllib.
>> The current situation is clearly wrong: regex is the only gnulib package
>> which requires prepending -I$(srcdir)/gllib to CPPFLAGS!
>
> It is the package's responsibility to be consistent about $(builddir)
> vs. $(srcdir). Don't use
>-I$(srcdir)/gllib
> or
>-I$(builddir)/gllib
> in isolation. Always use
>-I$(builddir)/gllib -I$(srcdir)/gllib
> so that -I options that come before it take precedence, -I options that come
> after have lower precedence, and files in $(builddir)/gllib hide possible
> (accidentally leftover) files in $(srcdir)/gllib.

well, instead of adding -I$(srcdir)/gllib, I symlink (shudder!!!) the
necessary headers into -I$(builddir):
in makemake.in:

GLLIB_MODULE_HEADERS="regex.h"
for f in localcharset.h ${GLLIB_MODULE_HEADERS} ${UNICODE_EXTRA}; do
  link_dep "${f}" `find ${SRCDIR}gllib/ -name ${f}`
done

which results in

regex.h : ../src/gllib/regex.h
-$(RM) regex.h
-$(LN_S) ../src/gllib/regex.h regex.h

streq.h : ../src/gllib/streq.h
-$(RM) streq.h
-$(LN_S) ../src/gllib/streq.h streq.h

cjk.h : ../src/gllib/uniwidth/cjk.h
-$(RM) cjk.h
-$(LN_S) ../src/gllib/uniwidth/cjk.h cjk.h

uninames.h : ../src/gllib/uniname/uninames.h
-$(RM) uninames.h
-$(LN_S) ../src/gllib/uniname/uninames.h uninames.h

the reason I cannot do -I$(srcdir)/gllib is clear: it will not catch
uninames.h & cjk.h.
on the other hand, it does not look like streq.h, uninames.h and cjk.h
are included in any clisp sources (only in gnulib).

so, I guess TRT is to remove the linking and add -I$(srcdir)/gllib to CPPFLAGS..

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://iris.org.il http://honestreporting.com http://openvotingconsortium.org
http://mideasttruth.com http://www.PetitionOnline.com/tap12009/ http://ffii.org
A man paints with his brains and not with his hands.



Re: new module 'stdalign'

2011-07-28 Thread Sam Steingold
Hi Bruno,

On Thu, Jul 28, 2011 at 7:47 PM, Bruno Haible  wrote:
> For alignof, whether you want to use gnulib's  depends on what you
> need - the necessary alignment and the optimal alignment.

so, what does clisp need?

-- 
Sam Steingold <http://sds.podval.org>



how do I build libgnu.so?

2011-07-28 Thread Sam Steingold
Hi,
Make in gllib creates libgnu.a but not libgnu.so (or libgnu.dll).
How do I create the shared library?
Thanks!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://mideasttruth.com http://thereligionofpeace.com http://pmw.org.il
http://ffii.org http://www.PetitionOnline.com/tap12009/
Bus error -- driver executed.



Re: regex.m4: how do I know that the included regex is used?

2011-07-28 Thread Sam Steingold
> * Paolo Bonzini  [2011-07-28 16:54:12 +0200]:
>
> The current situation is ugly---apart from the inconsistency in syntax
> definitions, there is no reason indeed why regex shouldn't use
> regex.in.h too, and no reason why it should require prepending
> -I$(srcdir)/gllib to CPPFLAGS.

Is it going to be fixed?  I need to decide whether I must commit the
prepending -I$(srcdir)/gllib to CPPFLAGS hack or wait for a gnulib fix.
Thanks.

> But it is not true that regex requires different CPPFLAGS depending on
> whether the included regex is used.

OK, I will take your word for that and redirect the future bug reports
(if any) to you.  Thanks. :-)

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://dhimmi.com http://pmw.org.il http://ffii.org http://camera.org
http://www.PetitionOnline.com/tap12009/ http://thereligionofpeace.com
recursion, n: See recursion.



Re: regex.m4: how do I know that the included regex is used?

2011-07-28 Thread Sam Steingold
> * Paolo Bonzini  [2011-07-28 12:15:38 +0200]:
>
> On 07/27/2011 05:11 PM, Sam Steingold wrote:
>> When the included regex is used I must prepend -I$(srcdir)/gllib to
>> CPPFLAGS to ensure that the gnulib regex.h is included in the sources.
>> (when this is not the case, I_must_  not do that!)
>   ^^
>
> This is not true AFAIK.

If I prepend -I$(srcdir)/gllib to CPPFLAFS, then

#include 

will read the gnulib header, not the system header.
How can you be sure that this will not lead to any problems given that
the libgnu.a does _not_ include regex.o?
If course, you can claim that, if gnulib regex.h were incompatible with
the system one, then configure would have detected that and included
gnulib regex in libgnu.a.
In that case, why the file fnmatch.in.h not called fnmatch.h?
At any rate, if gnulib regex is included in libgnu.a, then regex.h
should be copied (or linked) to $(builddir) or $(builddir)/gllib.
The current situation is clearly wrong: regex is the only gnulib package
which requires prepending -I$(srcdir)/gllib to CPPFLAFS!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://mideasttruth.com http://memri.org http://dhimmi.com http://truepeace.org
http://www.PetitionOnline.com/tap12009/ http://camera.org
MS Windows: error: the operation completed successfully.



undefined reference when linking a dll

2011-07-27 Thread Sam Steingold
e to `_rpl_getsockopt'
/cygdrive/c/sds/src/clisp/current/modules/rawsock/rawsock.c:1260: undefined 
reference to `_rpl_getsockopt'
/cygdrive/c/sds/src/clisp/current/modules/rawsock/rawsock.c:1263: undefined 
reference to `_rpl_getsockopt'
/cygdrive/c/sds/src/clisp/current/modules/rawsock/rawsock.c:1267: undefined 
reference to `_rpl_getsockopt'
/cygdrive/c/sds/src/clisp/current/modules/rawsock/rawsock.c:1275: undefined 
reference to `_rpl_getsockopt'
rawsock.o: In function `set_sock_opt':
/cygdrive/c/sds/src/clisp/current/modules/rawsock/rawsock.c:1356: undefined 
reference to `_rpl_setsockopt'
/cygdrive/c/sds/src/clisp/current/modules/rawsock/rawsock.c:1375: undefined 
reference to `_rpl_setsockopt'
/cygdrive/c/sds/src/clisp/current/modules/rawsock/rawsock.c:1378: undefined 
reference to `_rpl_setsockopt'
/cygdrive/c/sds/src/clisp/current/modules/rawsock/rawsock.c:1382: undefined 
reference to `_rpl_setsockopt'
/cygdrive/c/sds/src/clisp/current/modules/rawsock/rawsock.c:1393: undefined 
reference to `_rpl_setsockopt'
collect2: ld returned 1 exit status
./clisp-link: failed in /cygdrive/c/sds/src/clisp/current/build-mingw-g/full
make: *** [full] Error 1

$ nm libgnu.a | grep rpl_setsockopt
00c8 T _rpl_setsockopt
$ nm lisp.exe | grep rpl_setsockopt
0055dfbc T _rpl_setsockopt
$ grep rpl_setsockopt lisp.def
lisp.exe._rpl_setsockopt

this is despite "lisp.exe._rpl_setsockopt" et al being present in
lisp.def IMPORTS section.
note that all the other (non-gnulib) symbols in lisp.exe mentioned in
rawsock.o link just fine, e.g.:

asciz_to_string
$ nm rawsock/rawsock.o | grep asciz_to_string
 U __imp__asciz_to_string
$ nm lisp.exe | grep asciz_to_string
0044731c T _asciz_to_string
$ grep asciz_to_string lisp.def
lisp.exe.asciz_to_string

and there are no errors about asciz_to_string.

this is because asciz_to_string is declared with __declspec(dllexport)
where it is defined.
there seems to be no way to add such a declaration to the rpl_setsockopt
et al.

if, instead, I add libgnu.a to the command line, I get

libgnu.a(sendto.o): In function `rpl_sendto':
/cygdrive/c/sds/src/clisp/current/build-mingw-g/gllib/../../src/gllib/sendto.c:36:
 undefined reference to `__imp__sendto@24'

so, how do I create a dll which refers to the gnulib functionality?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://www.PetitionOnline.com/tap12009/ http://iris.org.il http://dhimmi.com
http://www.memritv.org http://openvotingconsortium.org http://camera.org
Two wrongs don't make a right, but three rights make a left.



Re: canonicalize_file_name should support win32 shortcuts

2011-07-27 Thread Sam Steingold
> * Sam Steingold  [2011-05-17 14:11:54 -0400]:
>
> it appears that neither canonicalize nor canonicalize-lgpl support win32
> shortcuts (either used directly or as used by cygwin).
> it would be nice if they did - then we would be able to use
> canonicalize-lgpl in clisp.
>
> now clisp uses file w32shell.c:
> http://clisp.hg.sourceforge.net/hgweb/clisp/clisp/raw-file/363f5b952505/src/w32shell.c
> which works like a charm for us.
> it would be wonderful if we could shift the burden of maintaining it to you.

Alas, clisp only supports the "*.lnk" style cygwin symlinks, not the now
default "cookie" style.
You will need to extract parts of winsup/cygwin/path.cc to support both styles.
My feature request still stands.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://ffii.org http://www.memritv.org http://pmw.org.il http://dhimmi.com
http://openvotingconsortium.org http://thereligionofpeace.com
Takeoffs are optional.  Landings are mandatory.



Re: new module 'stdalign'

2011-07-27 Thread Sam Steingold
Hi Bruno,
1. There is already alignof module - is this a replacement?
2. alignof.h uses offsetof macro - where is it defined?
3. clisp/src/lispbibl.d defines offsetof, offsetofa, alignof - which
   gnulib modules should they be imported from? (or should I just leave
   them defined in clisp?)
-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://thereligionofpeace.com http://jihadwatch.org http://dhimmi.com
http://honestreporting.com http://camera.org http://iris.org.il
Oral sex was invented by mermaids.



regex.m4: how do I know that the included regex is used?

2011-07-27 Thread Sam Steingold
Hi,
When the included regex is used I must prepend -I$(srcdir)/gllib to
CPPFLAGS to ensure that the gnulib regex.h is included in the sources.
(when this is not the case, I _must_ not do that!)
This raises 2 questions:

1. how do I know elsewhere in the configuration process that the
   included regex is used? the authoritative variable is
   ac_use_included_regex, but it is not cached, so sub-configures cannot
   access it.

2. what if there is some other gnulib package xeger with the same modus
   operandi? (i.e., if xeger is used, I must prepend -I$(srcdir)/gllib
   to CPPFLAGS and if it is not, I must not).
   what if regex IS used but xeger is NOT?

I propose that regex.h is replaced with regex.in.h just like
fnmatch.in.h (which has no @@ either).  This would solve the problem
without any action from the users of gnulib.

Thanks.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://openvotingconsortium.org http://ffii.org http://truepeace.org
http://camera.org http://thereligionofpeace.com http://www.memritv.org
Bus error -- please leave by the rear door.



Re: HAVE_RELIABLE_FIONREAD & ioctl

2011-07-21 Thread Sam Steingold
> * Bruno Haible  [2011-07-22 00:18:04 +0200]:
>
> -extern DIR *fdopendir (int);
> +extern
> +# ifdef __cplusplus
> +"C"
> +# endif
> +DIR *fdopendir (int);

that's pretty awful.
maybe there is a way to use the m4 magic to avoid replacing 1 line with 5?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://memri.org http://www.PetitionOnline.com/tap12009/ http://dhimmi.com
http://camera.org http://mideasttruth.com http://honestreporting.com
DRM "access management" == prison "freedom management".



Re: HAVE_RELIABLE_FIONREAD & ioctl

2011-07-21 Thread Sam Steingold
on 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, socklen_t, 
char*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, unsigned int, 
void*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, int, void*)' 
conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, long unsigned 
int, void*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, long int, 
void*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, size_t, 
void*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, socklen_t, 
void*)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, unsigned int, .
..)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
conftest.c:471: error: declaration of C function 'int ioctl(int, int, ...)' 
conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
configure:36267: $? = 1
configure:36267: g++ -c  -I/home/sds/src/top/include conftest.c >&5
configure:36267: $? = 0
configure:36296: result: extern int ioctl (int, unsigned long, ...);

$ grep IOCTL config.h
#define GNULIB_TEST_IOCTL 1
#define HAVE_IOCTL 1
#define HAVE_RAW_DECL_IOCTL 1
#define HAVE_SYS_IOCTL_H 1
/* #undef IOCTL_ARGUMENT_T */
#define IOCTL_DOTS /**/
#define IOCTL_REQUEST_T unsigned long
#define NEED_SYS_IOCTL_H /**/
#define WINSIZE_NEED_SYS_IOCTL_H /**/


-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://truepeace.org http://dhimmi.com http://www.memritv.org
http://jihadwatch.org http://memri.org http://camera.org
Press any key to continue or any other key to quit.



HAVE_RELIABLE_FIONREAD & ioctl

2011-07-20 Thread Sam Steingold
Hi Bruno,
I pulled ioctl module from gnulib because of a compilation error about
"ioctl_used_without_requesting_gnulib_ioctl" and I am wondering whether
the HAVE_RELIABLE_FIONREAD et al are still relevant.
Also, I get this error on linux:

/home/sds/src/clisp/sf/clisp/build-g-gxx/gllib/sys/ioctl.h:361: error: 
declaration of C function 'int ioctl(int, int, ...)' conflicts with
/usr/include/sys/ioctl.h:42: error: previous declaration 'int ioctl(int, long 
unsigned int, ...)' here
make: *** [spvw.o] Error 1

(after I removed the ioctl declaration from unix.h)
what's wrong?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://dhimmi.com http://www.memritv.org http://mideasttruth.com
http://pmw.org.il http://honestreporting.com http://thereligionofpeace.com
Despite the raising cost of living, it remains quite popular.



close depends on fclose?!

2011-07-20 Thread Sam Steingold
Hi
Why does close depend on fclose?!
It seems that, close being a system call and fclose being a C library
function, the dependency should be the other way around: fclose should
depend on close, but _NOT_ vice versa.
E.g., CLISP uses close but never FILE or fclose et al, so, when pulling
close, which pulled fclose, I got all these files which I will NEVER need:

? src/gllib/fclose.c
? src/gllib/fflush.c
? src/gllib/fpurge.c
? src/gllib/freading.c
? src/gllib/freading.h
? src/gllib/fseek.c
? src/gllib/fseeko.c
? src/gllib/ftell.c
? src/gllib/ftello.c
? src/gllib/stdio-impl.h
? src/gllib/stdio.in.h
? src/glm4/fclose.m4
? src/glm4/fflush.m4
? src/glm4/fpurge.m4
? src/glm4/freading.m4
? src/glm4/fseek.m4
? src/glm4/fseeko.m4
? src/glm4/ftell.m4
? src/glm4/ftello.m4
? src/glm4/stdio_h.m4

Could you please make close independent on stdio?
Thanks!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://www.PetitionOnline.com/tap12009/ http://memri.org http://ffii.org
http://camera.org http://truepeace.org http://openvotingconsortium.org
UNIX is as friendly to you as you are to it. Windows is hostile no matter what.



strerror_r replaced on linux?

2011-07-19 Thread Sam Steingold
Hi,

./config.log:REPLACE_STRERROR_R='1'

why do I see this on
Linux 2.6.18-238.9.1.el5
gcc (GCC) 4.1.2 20080704
glibc-2.5-58.el5_6.3

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://www.memritv.org http://iris.org.il http://dhimmi.com
http://ffii.org http://palestinefacts.org http://camera.org
A man paints with his brains and not with his hands.



Re: HAVE_LC_MESSAGES

2011-07-19 Thread Sam Steingold
> * Sam Steingold  [2011-07-14 17:57:10 -0400]:
>
>> * Bruno Haible  [2011-07-14 23:18:41 +0200]:
>>
>> Sam Steingold asked:
>>> Does clisp need to know whether LC_MESSAGES is supported by the system,
>>> or is a fake one defined by libintl or gnulib.
>>> ...
>>> > No, this is not needed: gettext's libintl.h already defines LC_MESSAGES 
>>> > when
>>> > needed, and clisp uses libintl.h.
>>> 
>>> CLISP includes libintl.h only if ENABLE_NLS is defined (i.e., when
>>> gettext is present).
>>> It uses HAVE_LC_MESSAGES in spvw_ctype.d:init_ctype which is called
>>> unconditionally in spvw.d.
>>> I.e., on platforms without gettext where LC_MESSAGES is not defined
>>> init_ctype is still called and its call
>>> 
>>>   setlocale(LC_MESSAGES,"");
>>> 
>>> must be guarded by either "#if HAVE_LC_MESSAGES" or "#ifdef LC_MESSAGES".
>>
>> By looking at the clisp code history:
>>   $ hg annotate -r 11858 spvw_ctype.d
>>   $ hg diff -r 3562 -r 3563
>> I think the point was to allow the setlocale() call to be enabled even on
>> platforms where  does not have LC_MESSAGES (namely, native 
>> Windows).
>> The macro HAVE_LC_MESSAGES means
>>   - on Unix platforms, that LC_MESSAGES was found in ,
>>   - on Windows platforms, that gettext is in use (always).
>
> what are the benefits of this very complex approach (autoconf, win32 &c &c)
> over a simple "ifdef LC_MESSAGES"?
>
>> I think you can remove the #if because all Unix platforms nowadays have
>> LC_MESSAGES.
>
> what about windows without gettext?

also, can I now remove gt_LC_MESSAGES from configure.in?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://www.memritv.org http://openvotingconsortium.org
http://truepeace.org http://iris.org.il http://camera.org http://ffii.org
If at first you don't suck seed, try and suck another seed.



Re: HAVE_LC_MESSAGES

2011-07-14 Thread Sam Steingold
> * Bruno Haible  [2011-07-14 23:18:41 +0200]:
>
> Sam Steingold asked:
>> Does clisp need to know whether LC_MESSAGES is supported by the system,
>> or is a fake one defined by libintl or gnulib.
>> ...
>> > No, this is not needed: gettext's libintl.h already defines LC_MESSAGES 
>> > when
>> > needed, and clisp uses libintl.h.
>> 
>> CLISP includes libintl.h only if ENABLE_NLS is defined (i.e., when
>> gettext is present).
>> It uses HAVE_LC_MESSAGES in spvw_ctype.d:init_ctype which is called
>> unconditionally in spvw.d.
>> I.e., on platforms without gettext where LC_MESSAGES is not defined
>> init_ctype is still called and its call
>> 
>>   setlocale(LC_MESSAGES,"");
>> 
>> must be guarded by either "#if HAVE_LC_MESSAGES" or "#ifdef LC_MESSAGES".
>
> By looking at the clisp code history:
>   $ hg annotate -r 11858 spvw_ctype.d
>   $ hg diff -r 3562 -r 3563
> I think the point was to allow the setlocale() call to be enabled even on
> platforms where  does not have LC_MESSAGES (namely, native Windows).
> The macro HAVE_LC_MESSAGES means
>   - on Unix platforms, that LC_MESSAGES was found in ,
>   - on Windows platforms, that gettext is in use (always).

what are the benefits of this very complex approach (autoconf, win32 &c &c)
over a simple "ifdef LC_MESSAGES"?

> I think you can remove the #if because all Unix platforms nowadays have
> LC_MESSAGES.

what about windows without gettext?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://honestreporting.com http://openvotingconsortium.org http://memri.org
http://jihadwatch.org http://truepeace.org http://palestinefacts.org
Oral sex was invented by mermaids.



Re: unistd & sys/socket

2011-07-14 Thread Sam Steingold
> * Eric Blake  [2011-07-14 07:43:40 -0600]:
>
> On 07/14/2011 07:37 AM, Sam Steingold wrote:
>> Hi,
>> in what order do I include sys/socket and unistd?
>> sys_socket.in.h:
>> #if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
>> # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
>> #  undef close
>> #  define close close_used_without_including_unistd_h
>> # else
>>_GL_WARN_ON_USE (close,
>> "close() used without including ");
>> # endif
>> #endif
>> 
>> so, on windows, I must include unistd before sys/socket, otherwise close
>> will not work.
>> 
>> otoh:
>> unistd.in.h:
>> #if @GNULIB_GETHOSTNAME@
>> /* Get all possible declarations of gethostname().  */
>> # if @UNISTD_H_HAVE_WINSOCK2_H@
>> #  if !defined _GL_SYS_SOCKET_H
>> #   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
>> #undef socket
>> #define socket  socket_used_without_including_sys_socket_h
>> 
>> so I must include sys/socket before unistd, otherwise socket (and many
>> others) will not work.
>> 
>> so, what is the right order?
>
> Do you have an actual compilation error, or are you just trying to
> understand the code?

this is an actual error, please see
http://article.gmane.org/gmane.lisp.clisp.devel:22588
and the whole thread.

> Both orders should work, if you are using the
> gnulib modules for both headers.

I have both modules.
unistd is requested explicitly.
sys_socket comes from a dependency.

> Note that in unistd.in.h, on mingw,  is included prior to
> this snippet of @GNULIB_GETHOSTNAME@, such that _GL_SYS_SOCKET_H is
> defined and you never get the
> socket_used_without_including_sys_socket_h, if you were using both
> gnulib modules.

the first mention of  in unistd.in.h is line 155:
  "socket() used without including ");


-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://camera.org http://mideasttruth.com http://www.memritv.org
http://dhimmi.com http://palestinefacts.org http://iris.org.il
Single tasking: Just Say No.



unistd & sys/socket

2011-07-14 Thread Sam Steingold
Hi,
in what order do I include sys/socket and unistd?
sys_socket.in.h:
#if @HAVE_WINSOCK2_H@ && !defined _GL_UNISTD_H
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
#  undef close
#  define close close_used_without_including_unistd_h
# else
   _GL_WARN_ON_USE (close,
"close() used without including ");
# endif
#endif

so, on windows, I must include unistd before sys/socket, otherwise close
will not work.

otoh:
unistd.in.h:
#if @GNULIB_GETHOSTNAME@
/* Get all possible declarations of gethostname().  */
# if @UNISTD_H_HAVE_WINSOCK2_H@
#  if !defined _GL_SYS_SOCKET_H
#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
#undef socket
#define socket  socket_used_without_including_sys_socket_h

so I must include sys/socket before unistd, otherwise socket (and many
others) will not work.

so, what is the right order?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://camera.org http://openvotingconsortium.org http://mideasttruth.com
http://iris.org.il http://pmw.org.il http://www.memritv.org
Lisp: it's here to save your butt.



Re: HAVE_LC_MESSAGES

2011-07-13 Thread Sam Steingold
> * Bruno Haible  [2011-07-13 22:44:49 +0200]:
>
> Sam Steingold wrote:
>> does clisp need to know the difference?
>> 
>> > This #if or #ifdef is outdated. The gettext manual [1] explains why.
>> > [1] http://www.gnu.org/software/gettext/manual/html_node/Triggering.html
>
> The gettext manual answers this question.

Sorry, I need more help here. I read the page and I see no answer to the
question:

Does clisp need to know whether LC_MESSAGES is supported by the system,
or is a fake one defined by libintl or gnulib.

Please remember that I am an "English-only bigot" who believes that all
i18n/l12n efforts are a waste of time :-) so I know very little about
gettext et al and I wish I knew even less.

>> are you suggesting that clisp should import the locale gnulib module instead?
>
> No, this is not needed: gettext's libintl.h already defines LC_MESSAGES when
> needed, and clisp uses libintl.h.

CLISP includes libintl.h only if ENABLE_NLS is defined (i.e., when
gettext is present).
It uses HAVE_LC_MESSAGES in spvw_ctype.d:init_ctype which is called
unconditionally in spvw.d.
I.e., on platforms without gettext where LC_MESSAGES is not defined
init_ctype is still called and its call

  setlocale(LC_MESSAGES,"");

must be guarded by either "#if HAVE_LC_MESSAGES" or "#ifdef LC_MESSAGES".

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://memri.org http://iris.org.il http://www.PetitionOnline.com/tap12009/
http://thereligionofpeace.com http://truepeace.org http://dhimmi.com
If at first you don't suck seed, try and suck another seed.



Re: HAVE_LC_MESSAGES

2011-07-13 Thread Sam Steingold
Hi,

> * Bruno Haible  [2011-07-13 21:12:49 +0200]:
> Sam Steingold wrote:
>> What's the point of HAVE_LC_MESSAGES?
>
> The point is to tell whether LC_MESSAGES is supported by the system,
> or is a fake one defined by libintl or gnulib.

does clisp need to know the difference?

> This #if or #ifdef is outdated. The gettext manual [1] explains why.
> [1] http://www.gnu.org/software/gettext/manual/html_node/Triggering.html

are you suggesting that clisp should import the locale gnulib module instead?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://truepeace.org http://jihadwatch.org http://honestreporting.com
http://ffii.org http://pmw.org.il http://palestinefacts.org http://iris.org.il
Oral sex was invented by mermaids.



HAVE_LC_MESSAGES

2011-07-13 Thread Sam Steingold
Hi,
What's the point of HAVE_LC_MESSAGES?
I understand that HAVE_LC_MESSAGES is defined whenever config.h is
included while LC_MESSAGES is only defined if locale.h is included.
However, how is

 #if HAVE_LC_MESSAGES
  setlocale(LC_MESSAGES,"");
 #endif

better than

 #ifdef LC_MESSAGES
  setlocale(LC_MESSAGES,"");
 #endif

??

thanks!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://iris.org.il http://palestinefacts.org http://dhimmi.com
http://thereligionofpeace.com http://ffii.org http://honestreporting.com
Flying is not dangerous; crashing is.



Re: errno --> errno name ?

2011-06-06 Thread Sam Steingold
Hi Bruno,

> * Bruno Haible  [2011-06-06 22:52:14 +0200]:
>> I think it would be a useful addition to the errno/strerror/whatever
>> modules to be able to convert from the numeric errno to the symbolic
>> one.
>> e.g.,
>> 
>> char * errno_name () {
>>   switch (errno) {
>>   #ifdef ENOENT
>>case ENOENT : return "ENOENT";
>>   #endif
>>default: return NULL;
>>   }
>> }
>> 
>> the idea is that the error "explanation" (returned by strerror) is
>> different on different platforms (and especially if i18n is involved)
>> and is hard to search for on the web and in docs, while strings like
>> ENOENT et al are quite canonical and tell the expert everything they
>> need to know.
>
> Good point. The code for doing this is already present in
> clisp/src/errunix.d and strace/**/errnoent.h.

moreover, most of it can be easily generated from the list of all
possible errno values:
-
char * errno_name () {
  switch (errno) {
#include "errno_cases.h"
default: return NULL;
  }
}

and a simple awk command which would convert a file:
-
ENOENT
ENOTDIR
...
-
into "errno_cases.h"

note that the windows version would have to operate on the values of
GetLastError() instead of errno.

> Question to Sam: Are you willing to contribute such a module to gnulib
> (and maintain it)?

Absolutely not.  The whole point of my request is that I will be
maintaining _less_ code, not more.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://pmw.org.il http://palestinefacts.org http://openvotingconsortium.org
http://www.memritv.org http://iris.org.il http://thereligionofpeace.com
Just because you're paranoid doesn't mean they AREN'T after you.



errno --> errno name ?

2011-06-06 Thread Sam Steingold
I think it would be a useful addition to the errno/strerror/whatever
modules to be able to convert from the numeric errno to the symbolic
one.
e.g.,

char * errno_name () {
  switch (errno) {
  #ifdef ENOENT
   case ENOENT : return "ENOENT";
  #endif
   default: return NULL;
  }
}

the idea is that the error "explanation" (returned by strerror) is
different on different platforms (and especially if i18n is involved)
and is hard to search for on the web and in docs, while strings like
ENOENT et al are quite canonical and tell the expert everything they
need to know.

I am not proposing replacing strerror, of course; this is merely an
_addition_.

Thanks.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://jihadwatch.org http://dhimmi.com http://palestinefacts.org
http://www.PetitionOnline.com/tap12009/ http://thereligionofpeace.com
What was there first: the Compiler or its Source code?



Re: need for computer algebra

2011-05-26 Thread Sam Steingold
Hi Bruno,

> * Bruno Haible  [2011-05-26 21:19:55 +0200]:
>
>> That's right, to interact with an ssh client, perl needs to do be able
>> to do number theoretical computer algebra system.
>> Can you believe it?!
>
> a good candidate is elliptic-curve cryptography.

yes, it turned out that the packages reimplements an ssh client rather
than being an interface to an existing external one, in which case pari
would obviously be not necessary.

incidentally, I was not able to get it working on either Cygwin of
CentOS, using either pre-supplied package managers or cpan.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://openvotingconsortium.org http://www.PetitionOnline.com/tap12009/
http://memri.org http://jihadwatch.org http://palestinefacts.org
Professionalism is being dispassionate about your work.



apology

2011-05-26 Thread Sam Steingold
I guess I should apologize for constantly harping about dependency creep
in gnulib.  No, gnulib is not the worst here.  By far!
I just did "yum install perl-Net-SSH-Perl.noarch" and it pulled 26
(that's right, twenty six!) packages for dependencies, including
perl-Math-GMP and perl-Math-Pari.
That's right, to interact with an ssh client, perl needs to do be able
to do number theoretical computer algebra system.
Can you believe it?!
-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://iris.org.il http://camera.org http://ffii.org
http://honestreporting.com http://palestinefacts.org http://pmw.org.il
Two wrongs don't make a right, but three rights make a left.



getloadavg is broken

2011-05-24 Thread Sam Steingold
Unless I remove the offending line (see the appended patch), configure
fails with "../src/src/gllib/getloadavg.c is missing" message.
apparently $srcdir is "../src" and $1=$gl_source_base="src/gllib" which
cannot be combined into anything sensible.
no other module does such a check, so it is not clear why getloadavg should.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://camera.org http://www.PetitionOnline.com/tap12009/
http://memri.org http://palestinefacts.org http://truepeace.org
Trespassers will be shot.  Survivors will be SHOT AGAIN!


diff -r efa3b7c4c766 src/glm4/getloadavg.m4
--- a/src/glm4/getloadavg.m4Tue May 24 16:34:36 2011 -0400
+++ b/src/glm4/getloadavg.m4Tue May 24 16:57:30 2011 -0400
@@ -20,10 +20,6 @@ AC_DEFUN([gl_GETLOADAVG],
 # Persuade glibc  to declare getloadavg().
 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
-# Make sure getloadavg.c is where it belongs, at configure-time.
-test -f "$srcdir/$1/getloadavg.c" ||
-  AC_MSG_ERROR([$srcdir/$1/getloadavg.c is missing])
-
 gl_save_LIBS=$LIBS
 
 # getloadvg is present in libc on glibc >= 2.2, MacOS X, FreeBSD >= 2.0,



Re: strerror vs. threads [was: new files imported without new modules added]

2011-05-24 Thread Sam Steingold
> * Eric Blake  [2011-05-24 12:24:34 -0600]:
>
> strerror(-1) in thread 1
> strerror(-2) in thread 2

thanks for the explanation.

My further questions are:
you are not using the standard win32 FormatMessage() function.
how do you hangle the gazillion windows error messages?
(same goes for system-supplied strerror - is it ever used?)

thanks!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://www.memritv.org http://mideasttruth.com http://palestinefacts.org
http://iris.org.il http://openvotingconsortium.org http://honestreporting.com
Murphy's Law was probably named after the wrong guy.



Re: new files imported without new modules added

2011-05-24 Thread Sam Steingold
> * Eric Blake  [2011-05-24 10:54:20 -0600]:
>
> Are you multi-threaded?  Then you are suffering from a data race.

I am sorry, I am afraid I am out of my depth.
Why is this function "suffering from a data race"?

const char *strerror (int e) {
  switch (e) {
case EINPROGRESS: return "Operation now in progress";
case EALREADY: return "Operation already in progress";
...
  }
}

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://honestreporting.com http://iris.org.il http://jihadwatch.org
http://pmw.org.il http://camera.org http://thereligionofpeace.com
The only time you have too much fuel is when you're on fire.



Re: request: pointer to the docs in the module file

2011-05-24 Thread Sam Steingold
> * Eric Blake  [2011-05-24 11:37:40 -0600]:
> On 05/24/2011 11:26 AM, Sam Steingold wrote:
>> How do I find out where a module is documented?
>> E.g., when I discovered the getloadavg module, I had to do
>> find gnulib/ -name getload\*
>> to find gnulib/doc/glibc-functions/getloadavg.texi.
>
> If it is a POSIX function, it is documented in
> gnulib/doc/posix-functions.  If it is a glibc extension, it is
> documented in gnulib/doc/glibc-functions.  Otherwise, it is a gnulib
> invention, and we haven't been very consistent at where that
> documentation lives.

Yes, thanks, you (or someone else) already told me that at least once,
and I am using the advice, even though I usually cannot tell right away
whether a specific function is posix or glibc (e.g., I thought that
mkdtemp was not in posix) - which is why I am asking for the link.

>> It would be nice if there were a pointer in gnulib/modules/getloadavg,
>> preferably a URL with the up-to-date (updated nightly) doc generated from
>> the texi file.
>
> I would prefer not in the modules file itself (that seems like a
> maintenance burden to have to manually maintain an extra link), but
> perhaps in the generated web page that describes each module.

I guess I am using gnulib wrong.
Suppose I want to replace my very own maze of #ifdefs surrounding a call
to a posix function foo() with a nice gnulib module foo.
Right now I look for modules/foo and, if I see that it does not pull in
too many dependencies, I try to find the texi file to see if it solves
my portability problems. This is why I want a link in the modules/foo
file to foo.texi (or foo.html) so that I do not have to run a find.
What is the right way?

>> Also, mkdir.texi says:
>> -
>> On Windows platforms (excluding Cygwin), this function is called 
>> @code{_mkdir}
>> and takes only one argument.  The fix (without Gnulib) is to define a macro
>> like this:
>> -
>> what does this mean?
>> I need to use this macro if I am not using Gnulib?
>> I need to define the macro even if I am using Gnulib?
>
> It means that you either use the gnulib module (and don't worry about
> anything extra), or you can be lighter-weight and use that listed
> workaround instead of the gnulib module.  So only define that macro only
> if you are not using gnulib.

So, if I were using the mkdir module (which I won't because it pulls
dirname-lgpl which pulls a bunch of other modules), I can use mkdir with
2 arguments on mingw too?
But which header file will defined mkdir with 2 arguments?
The mkdir module does not seem to export any header files.
Oh wait - it will replace mkdir with a _function_ rpl_mkdir, right?

> That is, docs/posix-functions is intended to be a catch-all for _all_
> portability problems, not just those fixed by gnulib, but tends to be
> biased towards gnulib solutions.

I am sorry, I can parse this sentence just fine, but I cannot extract
the meaning.  Remember, English is not my native language.

--
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://truepeace.org http://ffii.org http://openvotingconsortium.org
http://www.memritv.org http://honestreporting.com http://jihadwatch.org
As a computer, I find your faith in technology amusing.



Re: sed hangs on solaris

2011-05-24 Thread Sam Steingold
> * Paul Eggert  [2011-05-03 13:52:21 -0700]:
>
> On 05/03/11 13:26, Sam Steingold wrote:
>> note that some pipelines appear to succeed before the hanging:
>
> Yes.  If it is a kernel bug, quite possibly it's timing-dependent,
> and I wouldn't be surprised if it's not that common.

isn't gnulib's raison d'etre to work around system bugs and deficiencies? :-)
how about an --avoid-pipes option to something (configure?) which would
let me avoid editing the generated Makefile by hand?
Right now I need to apply the appended patch after each "make gllib".

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://thereligionofpeace.com http://ffii.org http://openvotingconsortium.org
http://camera.org http://jihadwatch.org http://www.memritv.org
There are no answers, only cross references.


--- gllib/Makefile.orig 2011-05-18 11:43:58.838261985 -0400
+++ gllib/Makefile  2011-05-18 11:46:31.150273797 -0400
@@ -2074,7 +2074,6 @@
 #  when the system doesn't have one.
 unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
-   { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
  -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
  -e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC system_header|g' \
@@ -2124,7 +2123,7 @@
  -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
  -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
  -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
- < $(srcdir)/unistd.in.h | \
+ < $(srcdir)/unistd.in.h > z
  sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
  -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
  -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
@@ -2163,7 +2162,7 @@
  -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
  -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
  -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
- | \
+ < z > y
  sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
  -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
  -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
@@ -2194,8 +2193,8 @@
  -e 
's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g'
 \
  -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
  -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
-   } > $@-t && \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+   < y > $@-t && \
mv $@-t $@
 
 unitypes.h: unitypes.in.h
@@ -2224,7 +2223,6 @@
 # version does not work standalone.
 wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
-   { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
  -e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC system_header|g' \
  -e 's|@''PRAGMA_COLUMNS''@||g' \
@@ -2270,7 +2268,7 @@
  -e 's|@''GNULIB_WCSSTR''@|$(GNULIB_WCSSTR)|g' \
  -e 's|@''GNULIB_WCSTOK''@|$(GNULIB_WCSTOK)|g' \
  -e 's|@''GNULIB_WCSWIDTH''@|$(GNULIB_WCSWIDTH)|g' \
- < $(srcdir)/wchar.in.h | \
+ < $(srcdir)/wchar.in.h > z
  sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
  -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
  -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
@@ -2311,7 +2309,7 @@
  -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
  -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
  -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
- | \
+ < z > y
  sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
  -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
  -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
@@ -2327,8 +2325,8 @@
  -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
  -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
  -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
- -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
-   } > $@-t && \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+   < y > $@-t && \
mv $@-t $@
 
 # We need the following in order to create  when the system



request: pointer to the docs in the module file

2011-05-24 Thread Sam Steingold
Hi,

How do I find out where a module is documented?
E.g., when I discovered the getloadavg module, I had to do
find gnulib/ -name getload\*
to find gnulib/doc/glibc-functions/getloadavg.texi.
It would be nice if there were a pointer in gnulib/modules/getloadavg,
preferably a URL with the up-to-date (updated nightly) doc generated from
the texi file.

Also, in the MODULES.html file:
1. the dependencies should be links
2. the links to files (e.g., argz.c et al) should specify the file type
text/plain so that firefox does not ask me how to open it.
3. should contain the aforementioned link to the doc generated from
*.texi

Also, some texi docs, e.g.,
   getutxid.texi
   getuid.texi
   getpwnam.texi
   getrusage.texi
say something like this:
-
Portability problems fixed by Gnulib:
@itemize
@end itemize

Portability problems not fixed by Gnulib:
@itemize
@item
This function is missing on some platforms: ...
@end itemize
-
if no "portability problems" are fixed, what does this module do?

Also, mkdir.texi says:
-
On Windows platforms (excluding Cygwin), this function is called @code{_mkdir}
and takes only one argument.  The fix (without Gnulib) is to define a macro
like this:
-
what does this mean?
I need to use this macro if I am not using Gnulib?
I need to define the macro even if I am using Gnulib?

Thanks.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://iris.org.il http://mideasttruth.com http://honestreporting.com
http://www.memritv.org http://ffii.org http://dhimmi.com http://pmw.org.il
non-smoking section in a restaurant == non-peeing section in a swimming pool



Re: new files imported without new modules added

2011-05-24 Thread Sam Steingold
> * Eric Blake  [2011-05-24 10:32:16 -0600]:
>
>> I do _not_ want strerror_r.
>
> Why not?

because I copy away the strerror return value right away.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://mideasttruth.com http://thereligionofpeace.com http://ffii.org
http://dhimmi.com http://openvotingconsortium.org http://palestinefacts.org
If you need a helping hand, just remember that you already have two.



Re: new files imported without new modules added

2011-05-24 Thread Sam Steingold
> * Eric Blake  [2011-05-24 10:21:16 -0600]:
> On 05/24/2011 10:18 AM, Eric Blake wrote:
>> On 05/24/2011 10:12 AM, Sam Steingold wrote:
>>> I updated gnulib and found that it now wants to add these files to
>>> CLISP:
>>>
>>> src/gllib/glthread/lock.c
>>> src/gllib/glthread/lock.h
>>> src/gllib/glthread/threadlib.c
>>> src/gllib/strerror-impl.h
>>> src/gllib/strerror_r.c
>>> src/glm4/strerror_r.m4
>>>
>>> I did not import any new modules.
>>> what has happened?
>
> That means that strerror-impl.h, strerror_r.c, and strerror_r.m4 will
> still be needed, but it would get rid of the three glthread files.

I think this is wrong. I do not want strerror_r. I did not ask for it
and there is no need for it in any module I asked for.

You are making the use of gnulib a very risky proposition.
I do _NOT_ want to bundle the whole of gnu libc with clisp.
You are making sure that I have to pull in more and more files every
time I update the gnulib files.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://ffii.org http://memri.org http://www.memritv.org http://pmw.org.il
http://iris.org.il http://dhimmi.com http://mideasttruth.com
Lisp is a way of life.  C is a way of death.



Re: new files imported without new modules added

2011-05-24 Thread Sam Steingold
> * Eric Blake  [2011-05-24 10:18:05 -0600]:
> On 05/24/2011 10:12 AM, Sam Steingold wrote:
>> I updated gnulib and found that it now wants to add these files to
>> CLISP:
>> 
>> src/gllib/glthread/lock.c
>> src/gllib/glthread/lock.h
>> src/gllib/glthread/threadlib.c
>> src/gllib/strerror-impl.h
>> src/gllib/strerror_r.c
>> src/glm4/strerror_r.m4
>> 
>> I did not import any new modules.
>> what has happened?
>
> strerror and perror now depend on strerror_r, and strerror_r depends
> on locking; this was done in order to fix perror bugs (perror is not
> allowed to modify the strerror static buffer).

Is there a way to avoid this dependency creep?
I do _not_ want strerror_r.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://dhimmi.com http://palestinefacts.org http://truepeace.org
http://camera.org http://www.memritv.org http://thereligionofpeace.com
As a computer, I find your faith in technology amusing.



new files imported without new modules added

2011-05-24 Thread Sam Steingold
Hi,
I updated gnulib and found that it now wants to add these files to
CLISP:

src/gllib/glthread/lock.c
src/gllib/glthread/lock.h
src/gllib/glthread/threadlib.c
src/gllib/strerror-impl.h
src/gllib/strerror_r.c
src/glm4/strerror_r.m4

I did not import any new modules.
what has happened?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://camera.org http://www.memritv.org http://mideasttruth.com
http://www.PetitionOnline.com/tap12009/ http://pmw.org.il http://dhimmi.com
Any programming language is at its best before it is implemented and used.



socketless platforms?

2011-05-18 Thread Sam Steingold
is there such a thing as a platform without socket support?
if yes, how do I detect that after I call gl_SOCKETLIB?
-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://www.memritv.org http://openvotingconsortium.org
http://pmw.org.il http://honestreporting.com http://palestinefacts.org
I'd give my right arm to be ambidextrous.



GNULIB_PORTCHECK

2011-05-18 Thread Sam Steingold
what does GNULIB_PORTCHECK mean?
e.g.,
./config.log:REPLACE_TIMEGM='GNULIB_PORTCHECK'
the only mention I see is time_h.m4:
  dnl If another module says to replace or to not replace, do that.
  dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
  dnl this lets maintainers check for portability.
I am confused (as usual, alas...)

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://www.memritv.org http://pmw.org.il http://mideasttruth.com
http://www.PetitionOnline.com/tap12009/ http://openvotingconsortium.org
Just because you're paranoid doesn't mean they AREN'T after you.



include without check

2011-05-18 Thread Sam Steingold
sys_uio.in.h includes  without #ifdef HAVE_SYS_TYPES_H.
can this file be assumed to be present on all platforms including mingw?
-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://palestinefacts.org http://mideasttruth.com http://pmw.org.il
http://honestreporting.com http://thereligionofpeace.com http://truepeace.org
MS Windows: error: the operation completed successfully.



canonicalize_file_name should support win32 shortcuts

2011-05-17 Thread Sam Steingold
it appears that neither canonicalize nor canonicalize-lgpl support win32
shortcuts (either used directly or as used by cygwin).
it would be nice if they did - then we would be able to use
canonicalize-lgpl in clisp.

now clisp uses file w32shell.c:
http://clisp.hg.sourceforge.net/hgweb/clisp/clisp/raw-file/363f5b952505/src/w32shell.c
which works like a charm for us.
it would be wonderful if we could shift the burden of maintaining it to you.

thanks!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://mideasttruth.com http://honestreporting.com http://palestinefacts.org
http://jihadwatch.org http://memri.org http://iris.org.il
Lisp suffers from being twenty or thirty years ahead of time.



Re: alloca-opt

2011-05-17 Thread Sam Steingold
> * Bruno Haible  [2011-05-17 01:00:57 +0200]:
>
> 3) Finally there is also documentation:
> <http://www.gnu.org/software/gnulib/manual/html_node/alloca_002dopt.html>

so, I guess, I will be using this:

#include 
#if HAVE_ALLOCA
  /* Yay! */
#elif defined(MICROSOFT)
  #include 
  #define alloca _alloca
#endif

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://truepeace.org http://ffii.org http://www.PetitionOnline.com/tap12009/
http://palestinefacts.org http://jihadwatch.org http://thereligionofpeace.com
Feynman: 'Philosophy of science is as useful to scientists as ornithology is to 
birds'



Re: do I need "ifdef HAVE_UNISTD_H" if I import unistd?

2011-05-16 Thread Sam Steingold
> * Eric Blake  [2011-05-16 15:57:43 -0600]:
>
> On 05/16/2011 03:56 PM, Sam Steingold wrote:
>> 
>> from the way VC_LIST_ALWAYS_EXCLUDE_REGEX is used, this appears to be TRT:
>> 
>> VC_LIST_ALWAYS_EXCLUDE_REGEX = ChangeLog|configure|config.in.h|aclocal.m4
>
> | outside () is different than (|).  Try:
>
> VC_LIST_ALWAYS_EXCLUDE_REGEX = \
>  ^(ChangeLog|configure|config.in.h|aclocal.m4)$$

does not work either.

also, this seems wrong because

1. when VC_LIST_ALWAYS_EXCLUDE_REGEX is used, it is put inside ()

2. my output looks like this:

../src/../src/configure:31052:#ifdef HAVE_UNISTD_H
../src/../src/configure:31330:#ifdef HAVE_UNISTD_H
../src/../src/configure:31425:#ifdef HAVE_UNISTD_H
../src/../src/configure:31538:#ifdef HAVE_UNISTD_H
../src/../src/configure:31562:#ifdef HAVE_UNISTD_H

so "^" does not look right.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://dhimmi.com http://ffii.org http://memri.org http://truepeace.org
http://jihadwatch.org http://www.PetitionOnline.com/tap12009/
Experience comes with debts.



environ

2011-05-16 Thread Sam Steingold
does importing the environ module mean that I can remove this:

#if !HAVE_DECL_ENVIRON
extern_C char** environ;
#endif

from my sources and assume that environ is properly declared in unistd?

also, how can I come up with the answer to this question myself without
bothering you?

thanks!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://honestreporting.com http://truepeace.org http://pmw.org.il
http://camera.org http://www.PetitionOnline.com/tap12009/
Before telling the Truth, make sure you know it.



Re: do I need "ifdef HAVE_UNISTD_H" if I import unistd?

2011-05-16 Thread Sam Steingold
> * Eric Blake  [2011-05-16 15:45:00 -0600]:
>
> On 05/16/2011 03:36 PM, Karl Berry wrote:
>> > warnings about HAVE_ALLOCA_H in ChangeLog, aclocal.m4, and configure.
>> 
>> Why should there ever be a warning about an occurrence of HAVE_ALLOCA_H
>> in the ChangeLog?  Just wondering.
>
> Only because the filters haven't been tuned to exclude non-source files
> by default for all of the syntax check rules.  It's not too hard to add
> ChangeLog to a permanent per-file exemption, by adding:
>
> VC_LIST_ALWAYS_EXCLUDE_REGEX = ^ChangeLog$$
>
> to cfg.mk.  Modify that regex as needed to permanently skip other files
> from the maint.mk syntax checks.

from the way VC_LIST_ALWAYS_EXCLUDE_REGEX is used, this appears to be TRT:

VC_LIST_ALWAYS_EXCLUDE_REGEX = ChangeLog|configure|config.in.h|aclocal.m4

however, it has no effect.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://jihadwatch.org http://openvotingconsortium.org http://truepeace.org
http://mideasttruth.com http://memri.org http://dhimmi.com
.ACMD setaloiv siht gnidaeR



Re: do I need "ifdef HAVE_UNISTD_H" if I import unistd?

2011-05-16 Thread Sam Steingold
> * Eric Blake  [2011-05-16 15:30:04 -0600]:
>
>> why doesn't vc-list-files accept a list of directories?
>
> Patches welcome; seems like a useful addition.



--- /home2/sds/src/clisp/current/gnulib/build-aux/vc-list-files 2011-05-03 
12:08:03.0 -0400
+++ /home2/sds/src/clisp/current/src/build-aux/vc-list-files2011-05-16 
17:42:00.0 -0400
@@ -2,7 +2,7 @@
 # List version-controlled file names.
 
 # Print a version string.
-scriptversion=2011-04-29.20; # UTC
+scriptversion=2011-05-16.21; # UTC
 
 # Copyright (C) 2006-2011 Free Software Foundation, Inc.
 
@@ -30,7 +30,7 @@ scriptversion=2011-04-29.20; # UTC
 postprocess=
 case $1 in
   --help) cat <&2
- echo "Usage: $0 [-C srcdir] [DIR]" 1>&2; exit 1;;
-esac
-
-test "x$dir" = x && dir=.
+dirs=$*
+test "x$dirs" = x && dirs=.
 
+for dir in $dirs; do
 if test -d .git; then
   test "x$dir" = x. \
 && dir= sed_esc= \
@@ -108,6 +102,7 @@ else
   echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
   exit 1
 fi
+done
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)

Diff finished.  Mon May 16 17:42:25 2011







>> (it would be 'src modules' for me)
>> why is $(srcdir)/lib/ hard-coded? I use gllib instead of lib.
>
> Where is it hard-coded?  We've been trying to get rid of hard-coded
> aspects, but we can only fix things as they are pointed out.

--- /home2/sds/src/clisp/current/gnulib/top/maint.mk2011-05-16 
16:32:49.0 -0400
+++ /home2/sds/src/clisp/current/maint.mk   2011-05-16 17:20:23.0 
-0400
@@ -681,7 +681,7 @@ sc_useless_cpp_parens:
 # #if HAVE_HEADER_H that you remove, be sure that your project explicitly
 # requires the gnulib module that guarantees the usability of that header.
 gl_assured_headers_ = \
-  cd $(gnulib_dir)/lib && echo *.in.h|sed 's/\.in\.h//g'
+  cd $(gnulib_dir) && echo *.in.h|sed 's/\.in\.h//g'
 
 # Convert the list of names to upper case, and replace each space with "|".
 az_ = abcdefghijklmnopqrstuvwxyz
@@ -718,7 +718,7 @@ gl_extract_significant_defines_ = \
 # of macros that are guaranteed to be defined by parts of gnulib.
 define def_sym_regex
gen_h=$(gl_generated_headers_); \
-   (cd $(gnulib_dir)/lib;  \
+   (cd $(gnulib_dir);  \
  for f in *.in.h $(gl_other_headers_); do  \
perl -lne '$(gl_extract_significant_defines_)' $$f; \
  done; \
@@ -1049,7 +1049,7 @@ writable-files:
  test "$$fail" && exit 1 || : ;\
fi
 
-v_etc_file = $(gnulib_dir)/lib/version-etc.c
+v_etc_file = $(gnulib_dir)/version-etc.c
 sample-test = tests/sample-test
 texi = doc/$(PACKAGE).texi
 # Make sure that the copyright date in $(v_etc_file) is up to date.

Diff finished.  Mon May 16 17:43:03 2011



-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://pmw.org.il http://www.memritv.org http://honestreporting.com
http://mideasttruth.com http://www.PetitionOnline.com/tap12009/
char*a="char*a=%c%s%c;main(){printf(a,34,a,34);}";main(){printf(a,34,a,34);}



Re: do I need "ifdef HAVE_UNISTD_H" if I import unistd?

2011-05-16 Thread Sam Steingold
> * Eric Blake  [2011-05-16 14:13:29 -0600]:
>
> Import that module, possibly add a cfg.mk counterpart (hmm, we
> probably ought to provide a template file for that; but you can use
> coreutils.git/cfg.mk for an idea of how it can be customized), use GNU
> make, and run 'make syntax-check' to catch a number of consistency
> errors.  If you decide that a particular syntax check is inappropriate
> for your project, cfg.mk will let you omit it.

it looks useful but _very_ hard to actually use.

why is maint.mk put into my top dir?
shouldn't it go to src/build-aux/?
why doesn't vc-list-files accept a list of directories?
(it would be 'src modules' for me)
why is $(srcdir)/lib/ hard-coded? I use gllib instead of lib.

when I managed to get it "running", I got
warnings about HAVE_ALLOCA_H in ChangeLog, aclocal.m4, and configure.

thanks for the pointer though...
-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://www.memritv.org http://openvotingconsortium.org http://camera.org
http://thereligionofpeace.com http://iris.org.il http://mideasttruth.com
Those who can't write, write manuals.



Re: gnulib compilation error

2011-05-16 Thread Sam Steingold
> * Bruno Haible  [2011-05-16 22:23:23 +0200]:
>
> With gnulib, 'restrict' ought to be defined by config.h. Maybe you
>have several config.h files, and one of them defines 'restrict' but not
>the others? Or maybe the compilation unit that you are compiling does
>not start with "#include "?

yes, thanks, fixed.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://mideasttruth.com http://www.memritv.org http://thereligionofpeace.com
http://openvotingconsortium.org http://truepeace.org http://honestreporting.com
Lisp: Serious empowerment.



Re: do I need "ifdef HAVE_UNISTD_H" if I import unistd?

2011-05-16 Thread Sam Steingold
> * Eric Blake  [2011-05-16 13:56:46 -0600]:
>
> On 05/16/2011 01:53 PM, Sam Steingold wrote:
>> DIUC that if I include the sys_time & unistd modules, I can write
>> 
>> #include 
>> #include 
>> 
>> instead of
>> 
>> #ifdef HAVE_SYS_TIME_H
>>  #include 
>> #endif
>> #ifdef HAVE_UNISTD_H
>>   #include 
>> #endif
>> 
>> ??
>> 
>> the same question for all the other headers...
>
> Absolutely!  In fact, the maintainer-mode module includes the
> sc_prohibit_always_true_header_tests to help you check for files where
> you can unconditionally include headers guaranteed by gnulib replacements.

there is no maintainer-mode in gnulib/modules.
how do I use it?

thanks!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://openvotingconsortium.org http://honestreporting.com
http://camera.org http://thereligionofpeace.com http://truepeace.org
Genius is immortal, but morons live longer.



Re: gnulib compilation error

2011-05-16 Thread Sam Steingold
> * Eric Blake  [2011-05-16 13:55:31 -0600]:
>
> On 05/16/2011 01:51 PM, Sam Steingold wrote:
>> I am getting this error:
>
> On which platform?

CentOS release 5.6 (Final)
Linux 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 
GNU/Linux

sorry about not including the obviously required information right away


-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://iris.org.il http://camera.org http://palestinefacts.org
http://jihadwatch.org http://mideasttruth.com http://ffii.org
Bill Gates is not god and Microsoft is not heaven.



do I need "ifdef HAVE_UNISTD_H" if I import unistd?

2011-05-16 Thread Sam Steingold
DIUC that if I include the sys_time & unistd modules, I can write

#include 
#include 

instead of

#ifdef HAVE_SYS_TIME_H
 #include 
#endif
#ifdef HAVE_UNISTD_H
  #include 
#endif

??

the same question for all the other headers...

thanks!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://openvotingconsortium.org http://pmw.org.il http://palestinefacts.org
http://www.memritv.org http://honestreporting.com http://truepeace.org
Politically Correct Chess: Translucent VS. Transparent.



gnulib compilation error

2011-05-16 Thread Sam Steingold
I am getting this error:

In file included from /home/sds/src/clisp/current/build-g/gllib/sys/stat.h:44,
 from clisp.c:31:
/home/sds/src/clisp/current/build-g/gllib/time.h:469: error: expected ';', ',' 
or ')' before '__timer'
/home/sds/src/clisp/current/build-g/gllib/time.h:491: error: expected ';', ',' 
or ')' before '__timer'

time.h:469:_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict 
__timer,
 struct tm *restrict __result)
_GL_ARG_NONNULL ((1, 2)));

it appears that time_t is not defined.

I am including these modules:

no-c++ stdint stdbool havelib gettext localcharset
uniwidth/width streq uniname/uniname unitypes link-follow
host-cpu-c-abi socklen sockets fd-hook setenv unsetenv errno
arpa_inet netinet_in inet_ntop inet_pton lstat stat canonicalize-lgpl
nocrash libsigsegv gnu-make gettimeofday getpagesize sys_time sys_wait
 mktime strftime strptime strverscmp uname strerror fnmatch-gnu
 regex

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://mideasttruth.com http://pmw.org.il
http://ffii.org http://memri.org http://thereligionofpeace.com
Independence: nobody pays for you.  Liberty: nobody thinks for you.



Re: dependency creep: canonicalize_file_name

2011-05-04 Thread Sam Steingold
> * Eric Blake  [2011-05-04 10:03:36 -0600]:
> On 05/04/2011 09:51 AM, Sam Steingold wrote:
>> And yet again it is time for me to bitch about dependency creep.
>> 
>> discovered that it offered canonicalize_file_name instead.
>
> Try canonicalize-lgpl instead; much lighter-weight, and is the only
> module that gives you a working realpath().

Indeed, much better:

$ wc `hg st -u | cut -c2-`
  378  1324 10439 src/gllib/canonicalize-lgpl.c
   53   261  2011 src/gllib/dosname.h
   91   490  3191 src/gllib/lstat.c
   48   227  1525 src/gllib/pathmax.h
   74   347  2355 src/gllib/readlink.c
  105   458  3425 src/gllib/stat.c
  658  2489 18324 src/gllib/sys_stat.in.h
  249  1093  9223 src/gllib/time.in.h
   94   274  2986 src/glm4/canonicalize.m4
   38   212  1621 src/glm4/double-slash-root.m4
   69   274  2652 src/glm4/lstat.m4
   1355   441 src/glm4/pathmax.m4
   62   210  2218 src/glm4/readlink.m4
   66   250  2436 src/glm4/stat.m4
   82   259  3278 src/glm4/sys_stat_h.m4
  109   305  4247 src/glm4/time_h.m4
 2189  8528 70372 total

Still I get 2000+ lines to replace 200- lines I have.

>> People, this is ridiculous.
>
> canonicalize no longer even provides realpath().  But again,

I would be perfectly fine with canonicalize_file_name() instead of realpath().

> realpath.texi tells you to use canonicalize-lgpl rather than canonicalize.

What I was complaining about is that I have to pull 150+ _files_ to define
a function whose C code takes about the same number of _lines_.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://thereligionofpeace.com http://jihadwatch.org http://dhimmi.com
http://honestreporting.com http://truepeace.org
Single tasking: Just Say No.



bug-gnulib@gnu.org

2011-05-04 Thread Sam Steingold
  0x126c  libgnu_wc.a(fnmatch.o)
getenv  0x1897  libgnu_wc.a(fnmatch.o)
memcpy  0x195   libgnu_wc.a(fnmatch.o)
memcpy  0x261   libgnu_wc.a(fnmatch.o)
__assert0x299   libgnu_wc.a(fnmatch.o)
__assert0x475   libgnu_wc.a(fnmatch.o)
__assert0x578   libgnu_wc.a(fnmatch.o)
__assert0x1208  libgnu_wc.a(fnmatch.o)
__assert0x1226  libgnu_wc.a(fnmatch.o)
__assert0x14e9  libgnu_wc.a(fnmatch.o)
__assert0x200d  libgnu_wc.a(fnmatch.o)
__assert0x203a  libgnu_wc.a(fnmatch.o)
__assert0x2057  libgnu_wc.a(fnmatch.o)
strcat  0x323   libgnu_wc.a(fnmatch.o)
tolower 0x8c4   libgnu_wc.a(fnmatch.o)
tolower 0x8e0   libgnu_wc.a(fnmatch.o)
tolower 0x947   libgnu_wc.a(fnmatch.o)
tolower 0x980   libgnu_wc.a(fnmatch.o)
tolower 0xa5c   libgnu_wc.a(fnmatch.o)
tolower 0xab1   libgnu_wc.a(fnmatch.o)
tolower 0xbde   libgnu_wc.a(fnmatch.o)
tolower 0xbf5   libgnu_wc.a(fnmatch.o)
tolower 0xeea   libgnu_wc.a(fnmatch.o)
wctype  0x9e4   libgnu_wc.a(fnmatch.o)
wctype  0x1ced  libgnu_wc.a(fnmatch.o)
btowc   0xa05   libgnu_wc.a(fnmatch.o)
iswctype0xa0d   libgnu_wc.a(fnmatch.o)
iswctype0x1d09  libgnu_wc.a(fnmatch.o)
memchr  0xb0f   libgnu_wc.a(fnmatch.o)
memchr  0xd20   libgnu_wc.a(fnmatch.o)
wcslen  0x1000  libgnu_wc.a(fnmatch.o)
wmemcpy 0x10e2  libgnu_wc.a(fnmatch.o)
wmemcpy 0x11d7  libgnu_wc.a(fnmatch.o)
wcscat  0x12a2  libgnu_wc.a(fnmatch.o)
towlower0x1572  libgnu_wc.a(fnmatch.o)
towlower0x1829  libgnu_wc.a(fnmatch.o)
towlower0x1843  libgnu_wc.a(fnmatch.o)
towlower0x1965  libgnu_wc.a(fnmatch.o)
towlower0x1994  libgnu_wc.a(fnmatch.o)
towlower0x1ad7  libgnu_wc.a(fnmatch.o)
towlower0x1aee  libgnu_wc.a(fnmatch.o)
towlower0x1c56  libgnu_wc.a(fnmatch.o)
wmemchr 0x1a1f  libgnu_wc.a(fnmatch.o)
wmemchr 0x1c79  libgnu_wc.a(fnmatch.o)
__ctype 0x1e9f  libgnu_wc.a(fnmatch.o)
mbsrtowcs   0x1efc  libgnu_wc.a(fnmatch.o)
mbsrtowcs   0x1f2d  libgnu_wc.a(fnmatch.o)
mbsrtowcs   0x1fa4  libgnu_wc.a(fnmatch.o)
mbsrtowcs   0x1fc7  libgnu_wc.a(fnmatch.o)
mbsinit 0x1f11  libgnu_wc.a(fnmatch.o)
mbsinit 0x1f43  libgnu_wc.a(fnmatch.o)
mbsinit 0x1faf  libgnu_wc.a(fnmatch.o)
free0x201b  libgnu_wc.a(fnmatch.o)
malloc  0x206e  libgnu_wc.a(fnmatch.o)
errno   0x2086  libgnu_wc.a(fnmatch.o)
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status

3. when clisp is configured normally, dynmod/lib-wildcard.so is created
without an error, but loading is fails:
 (REQUIRE "wildcard") ==>
;; Loading file /.../dynmod/wildcard.lisp ...
;;  Loading module wildcard from /.../dynmod/lib-wildcard.so
[SIMPLE-ERROR]: SYSTEM::DYNLOAD-MODULES: "dlopen" ->
  "ld.so.1: lisp.run: fatal: relocation error:
  file /.../dynmod/lib-wildcard.so: symbol rpl_mbsrtowcs:
  referenced symbol not found"

I am passing CFLAGS et al to the gnulib compilation, so "-fPIC -DPIC"
should have been used.

Bruno, do you have any insight on the matter?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://truepeace.org http://www.memritv.org http://thereligionofpeace.com
http://ffii.org http://honestreporting.com http://mideasttruth.com
Sinners can repent, but stupid is forever.



dependency creep: canonicalize_file_name

2011-05-04 Thread Sam Steingold
And yet again it is time for me to bitch about dependency creep.

I thought about pulling realpath from gnulib (because clisp includes its
own implementation - BTW, are there still unixes which lack it?) and
discovered that it offered canonicalize_file_name instead.
I tried pulling it and the list of new files I got did not fit on the screen:

? src/gllib/areadlink-with-size.c
? src/gllib/areadlink.h
? src/gllib/at-func.c
? src/gllib/basename-lgpl.c
? src/gllib/basename.c
? src/gllib/bitrotate.h
? src/gllib/canonicalize.c
? src/gllib/canonicalize.h
? src/gllib/chdir-long.c
? src/gllib/chdir-long.h
? src/gllib/chown.c
? src/gllib/cloexec.c
? src/gllib/cloexec.h
? src/gllib/close.c
? src/gllib/dirent.in.h
? src/gllib/dirfd.c
? src/gllib/dirname-lgpl.c
? src/gllib/dirname.c
? src/gllib/dirname.h
? src/gllib/dosname.h
? src/gllib/dup-safer.c
? src/gllib/dup2.c
? src/gllib/error.c
? src/gllib/error.h
? src/gllib/exitfail.c
? src/gllib/exitfail.h
? src/gllib/fchdir.c
? src/gllib/fchmodat.c
? src/gllib/fchown-stub.c
? src/gllib/fchownat.c
? src/gllib/fclose.c
? src/gllib/fcntl.c
? src/gllib/fcntl.in.h
? src/gllib/fd-safer.c
? src/gllib/fdopendir.c
? src/gllib/file-set.c
? src/gllib/file-set.h
? src/gllib/filenamecat-lgpl.c
? src/gllib/filenamecat.h
? src/gllib/freading.c
? src/gllib/freading.h
? src/gllib/fstatat.c
? src/gllib/getcwd-lgpl.c
? src/gllib/getcwd.c
? src/gllib/getdtablesize.c
? src/gllib/hash-pjw.c
? src/gllib/hash-pjw.h
? src/gllib/hash-triple.c
? src/gllib/hash-triple.h
? src/gllib/hash.c
? src/gllib/hash.h
? src/gllib/intprops.h
? src/gllib/lchown.c
? src/gllib/lseek.c
? src/gllib/lstat.c
? src/gllib/malloc.c
? src/gllib/mempcpy.c
? src/gllib/memrchr.c
? src/gllib/mkdir.c
? src/gllib/mkdirat.c
? src/gllib/open.c
? src/gllib/openat-die.c
? src/gllib/openat-priv.h
? src/gllib/openat-proc.c
? src/gllib/openat.c
? src/gllib/openat.h
? src/gllib/pathmax.h
? src/gllib/pipe-safer.c
? src/gllib/readlink.c
? src/gllib/realloc.c
? src/gllib/rmdir.c
? src/gllib/same-inode.h
? src/gllib/same.c
? src/gllib/same.h
? src/gllib/save-cwd.c
? src/gllib/save-cwd.h
? src/gllib/stat.c
? src/gllib/stdio-impl.h
? src/gllib/stdio.in.h
? src/gllib/strdup.c
? src/gllib/strerror.c
? src/gllib/stripslash.c
? src/gllib/strndup.c
? src/gllib/strnlen.c
? src/gllib/sys_stat.in.h
? src/gllib/time.in.h
? src/gllib/unistd--.h
? src/gllib/unistd-safer.h
? src/gllib/unlink.c
? src/gllib/unlinkat.c
? src/gllib/xalloc-die.c
? src/gllib/xalloc-oversized.h
? src/gllib/xalloc.h
? src/gllib/xgetcwd.c
? src/gllib/xgetcwd.h
? src/gllib/xmalloc.c
? src/gllib/xstrndup.c
? src/gllib/xstrndup.h
? src/glm4/canonicalize.m4
? src/glm4/chdir-long.m4
? src/glm4/chown.m4
? src/glm4/cloexec.m4
? src/glm4/close.m4
? src/glm4/d-ino.m4
? src/glm4/dirent_h.m4
? src/glm4/dirfd.m4
? src/glm4/dirname.m4
? src/glm4/double-slash-root.m4
? src/glm4/dup2.m4
? src/glm4/error.m4
? src/glm4/fchdir.m4
? src/glm4/fclose.m4
? src/glm4/fcntl.m4
? src/glm4/fcntl_h.m4
? src/glm4/fdopendir.m4
? src/glm4/filenamecat.m4
? src/glm4/freading.m4
? src/glm4/getcwd-abort-bug.m4
? src/glm4/getcwd-path-max.m4
? src/glm4/getcwd.m4
? src/glm4/getdtablesize.m4
? src/glm4/hash.m4
? src/glm4/inline.m4
? src/glm4/lchown.m4
? src/glm4/lseek.m4
? src/glm4/lstat.m4
? src/glm4/malloc.m4
? src/glm4/mempcpy.m4
? src/glm4/memrchr.m4
? src/glm4/mkdir.m4
? src/glm4/mode_t.m4
? src/glm4/open.m4
? src/glm4/openat.m4
? src/glm4/pathmax.m4
? src/glm4/readlink.m4
? src/glm4/realloc.m4
? src/glm4/rmdir.m4
? src/glm4/same.m4
? src/glm4/save-cwd.m4
? src/glm4/ssize_t.m4
? src/glm4/stat.m4
? src/glm4/stdio_h.m4
? src/glm4/strdup.m4
? src/glm4/strerror.m4
? src/glm4/strndup.m4
? src/glm4/strnlen.m4
? src/glm4/sys_stat_h.m4
? src/glm4/time_h.m4
? src/glm4/unistd-safer.m4
? src/glm4/unlink.m4
? src/glm4/xalloc.m4
? src/glm4/xgetcwd.m4
? src/glm4/xstrndup.m4

Yep, 150+ new files just for canonicalize_file_name (realpath
in clisp/src/pathname.d almost takes about 160 lines of C code).

People, this is ridiculous.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://pmw.org.il http://ffii.org http://iris.org.il http://memri.org
http://www.PetitionOnline.com/tap12009/ http://truepeace.org
Three can keep a secret if two of them are dead.



Re: what happened to HAVE_STDBOOL_H

2011-05-03 Thread Sam Steingold
> * Eric Blake  [2011-05-03 16:03:16 -0600]:
>
> On 05/03/2011 03:52 PM, Sam Steingold wrote:
>> when I regenerate config.h with the current gnulib, I get:
>> 
>> @@ -871,12 +979,6 @@
>>  /* `struct sockaddr_un' from  has a `sun_len' field */
>>  #undef HAVE_SOCKADDR_UN_LEN
>>  
>> -/* Define to 1 if stdbool.h conforms to C99. */
>> -#undef HAVE_STDBOOL_H
>> -
>> -/* Define to 1 if you have the  header file. */
>> -#undef HAVE_STDDEF_H
>> -
>>  /* Define to 1 if you have the  header file. */
>>  #undef HAVE_STDINT_H
>>  
>> 
>> what happenned? are we assuming that all platforms now have these files?
>
>  is required by C89, so yes, it was a redundant declaration.
>
>  is not required by C89.  However, nothing else in gnulib
> used the results of the test, and the idea is that if you are using
> gnulib's stdbool module, you don't care about a fully
> standards-compliant , rather you care about the subset of
>  guaranteed by gnulib.  So we trimmed the size of config.h
> for the sake of emacs:
> http://lists.gnu.org/archive/html/bug-gnulib/2011-01/msg00571.html

So, how do I know if gnulib created the file or not?
(if you must know, in clisp we create a header clisp.h for external
modules to include and it either includes the generated "stdbool.h"
literally or does "#include "; we used HAVE_STDBOOL_H to
decide what to do).

Thanks.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://truepeace.org http://pmw.org.il http://iris.org.il http://jihadwatch.org
http://www.PetitionOnline.com/tap12009/ http://openvotingconsortium.org
A computer scientist is someone who fixes things that aren't broken.



what happened to HAVE_STDBOOL_H

2011-05-03 Thread Sam Steingold
when I regenerate config.h with the current gnulib, I get:

@@ -871,12 +979,6 @@
 /* `struct sockaddr_un' from  has a `sun_len' field */
 #undef HAVE_SOCKADDR_UN_LEN
 
-/* Define to 1 if stdbool.h conforms to C99. */
-#undef HAVE_STDBOOL_H
-
-/* Define to 1 if you have the  header file. */
-#undef HAVE_STDDEF_H
-
 /* Define to 1 if you have the  header file. */
 #undef HAVE_STDINT_H
 

what happenned? are we assuming that all platforms now have these files?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://pmw.org.il http://honestreporting.com http://dhimmi.com
http://camera.org http://openvotingconsortium.org http://truepeace.org
If Perl is the solution, you're solving the wrong problem. - Erik Naggum



Re: sed hangs on solaris

2011-05-03 Thread Sam Steingold
> * Paul Eggert  [2011-05-03 13:13:03 -0700]:
>
> On 05/03/11 13:00, Sam Steingold wrote:
>>> > So, we have (sed X | sed Y | sed Z), and sed X is sleeping waiting
>>> > for its write to finish, while sed Y is sleeping waiting for its
>>> > read to finish.  I'm not sure, but this would appear to be
>>> > a kernel bug in Solaris 11.
>> that sucks.
>> so, am I stuck?
>
> If my diagnosis is right, then yes, it's be a fairly serious kernel bug
> that really should get fixed, or lots of shell pipelines will stop
> working.  I could be wrong, though.

note that some pipelines appear to succeed before the hanging:

$ \rm -rf gllib/
$ make
mkdir -p gllib
test -f gllib/Makefile || sh config.status gllib/Makefile depfiles
config.status: creating gllib/Makefile
config.status: executing depfiles commands
cd gllib && make CFLAGS="-g -O2 -W -Wswitch -Wcomment -Wpointer-arith 
-Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare 
-Wno-format-nonliteral -O2 -fexpensive-optimizations -falign-functions=4 
-DUNIX_BINARY_DISTRIB -DENABLE_UNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -I.  
-fPIC -DPIC" CLISP_LIBDIR=/export/home/sds/src/clisp/current/build-O
rm -f alloca.h-t alloca.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  cat ../../src/gllib/alloca.in.h; \
} > alloca.h-t && \
mv -f alloca.h-t alloca.h
rm -f arg-nonnull.h-t arg-nonnull.h && \
sed -n -e '/GL_ARG_NONNULL/,$p' \
  < /export/home/sds/src/clisp/current/build-O/build-aux/arg-nonnull.h \
| sed -e 's/_GL_/_gl_GL_/g' \
  > arg-nonnull.h-t && \
mv arg-nonnull.h-t arg-nonnull.h
rm -f c++defs.h-t c++defs.h && \
sed -n -e '/_GL_CXXDEFS/,$p' \
  < /export/home/sds/src/clisp/current/build-O/build-aux/c++defs.h \
| sed -e 's/_GL_/_gl_GL_/g' \
  > c++defs.h-t && \
mv c++defs.h-t c++defs.h
rm -f warn-on-use.h-t warn-on-use.h && \
sed -n -e '/^.ifndef/,$p' \
  < /export/home/sds/src/clisp/current/build-O/build-aux/warn-on-use.h \
| sed -e 's/_GL_/_gl_GL_/g' \
  > warn-on-use.h-t && \
mv warn-on-use.h-t warn-on-use.h
/usr/gnu/bin/mkdir -p arpa
rm -f arpa/inet.h-t arpa/inet.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  sed -e 's|@''INCLUDE_NEXT''@|include_next|g' \
  -e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC system_header|g' \
  -e 's|@''PRAGMA_COLUMNS''@||g' \
  -e 's|@''HAVE_FEATURES_H''@|0|g' \
  -e 's|@''NEXT_ARPA_INET_H''@||g' \
  -e 's|@''HAVE_ARPA_INET_H''@|1|g' \
  -e 's|@''GNULIB_INET_NTOP''@|1|g' \
  -e 's|@''GNULIB_INET_PTON''@|1|g' \
  -e 's|@''HAVE_DECL_INET_NTOP''@|1|g' \
  -e 's|@''HAVE_DECL_INET_PTON''@|1|g' \
  -e '/definitions of _gl_GL_FUNCDECL_RPL/r c++defs.h' \
  -e '/definition of _gl_GL_ARG_NONNULL/r arg-nonnull.h' \
  -e '/definition of _gl_GL_WARN_ON_USE/r warn-on-use.h' \
  < ../../src/gllib/arpa_inet.in.h; \
} > arpa/inet.h-t && \
mv arpa/inet.h-t arpa/inet.h
rm -f configmake.h-t && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  echo '#define PREFIX "/usr/local"'; \
  echo '#define EXEC_PREFIX "/usr/local"'; \
  echo '#define BINDIR "/usr/local/bin"'; \
  echo '#define SBINDIR "/usr/local/sbin"'; \
  echo '#define LIBEXECDIR "/usr/local/libexec"'; \
  echo '#define DATAROOTDIR "/usr/local/share"'; \
  echo '#define DATADIR "/usr/local/share"'; \
  echo '#define SYSCONFDIR "/usr/local/etc"'; \
  echo '#define SHAREDSTATEDIR "/usr/local/com"'; \
  echo '#define LOCALSTATEDIR "/usr/local/var"'; \
  echo '#define INCLUDEDIR "/usr/local/include"'; \
  echo '#define OLDINCLUDEDIR "/usr/include"'; \
  echo '#define DOCDIR "/usr/local/share/doc/clisp"'; \
  echo '#define INFODIR "/usr/local/share/info"'; \
  echo '#define HTMLDIR "/usr/local/share/doc/clisp"'; \
  echo '#define DVIDIR "/usr/local/share/doc/clisp"'; \
  echo '#define PDFDIR "/usr/local/share/doc/clisp"'; \
  echo '#define PSDIR "/usr/local/share/doc/clisp"'; \
  echo '#define LIBDIR "/usr/local/lib"'; \
  echo '#define LISPDIR "/usr/local/share/emacs/site-lisp"&#

sed hangs on solaris

2011-05-03 Thread Sam Steingold
''HAVE_GETLOGIN''@|1|g' \
  -e 's|@''HAVE_GETPAGESIZE''@|1|g' \
  -e 's|@''HAVE_LCHOWN''@|1|g' \
  -e 's|@''HAVE_LINK''@|1|g' \
  -e 's|@''HAVE_LINKAT''@|1|g' \
  -e 's|@''HAVE_PIPE''@|1|g' \
  -e 's|@''HAVE_PIPE2''@|1|g' \
  -e 's|@''HAVE_PREAD''@|1|g' \
  -e 's|@''HAVE_PWRITE''@|1|g' \
  -e 's|@''HAVE_READLINK''@|1|g' \
  -e 's|@''HAVE_READLINKAT''@|1|g' \
  -e 's|@''HAVE_SLEEP''@|1|g' \
  -e 's|@''HAVE_SYMLINK''@|1|g' \
  -e 's|@''HAVE_SYMLINKAT''@|1|g' \
  -e 's|@''HAVE_UNLINKAT''@|1|g' \
  -e 's|@''HAVE_USLEEP''@|1|g' \
  -e 's|@''HAVE_DECL_ENVIRON''@|0|g' \
  -e 's|@''HAVE_DECL_FCHDIR''@|1|g' \
  -e 's|@''HAVE_DECL_GETDOMAINNAME''@|1|g' \
  -e 's|@''HAVE_DECL_GETLOGIN_R''@|1|g' \
  -e 's|@''HAVE_DECL_GETPAGESIZE''@|1|g' \
  -e 's|@''HAVE_DECL_GETUSERSHELL''@|1|g' \
  -e 's|@''HAVE_DECL_TTYNAME_R''@|1|g' \
  -e 's|@''HAVE_OS_H''@|0|g' \
  -e 's|@''HAVE_SYS_PARAM_H''@|0|g' \
  | \
  sed -e 's|@''REPLACE_CHOWN''@|0|g' \
  -e 's|@''REPLACE_CLOSE''@|0|g' \
  -e 's|@''REPLACE_DUP''@|0|g' \
  -e 's|@''REPLACE_DUP2''@|0|g' \
  -e 's|@''REPLACE_FCHOWNAT''@|0|g' \
  -e 's|@''REPLACE_GETCWD''@|0|g' \
  -e 's|@''REPLACE_GETDOMAINNAME''@|0|g' \
  -e 's|@''REPLACE_GETLOGIN_R''@|0|g' \
  -e 's|@''REPLACE_GETGROUPS''@|0|g' \
  -e 's|@''REPLACE_GETPAGESIZE''@|0|g' \
  -e 's|@''REPLACE_LCHOWN''@|0|g' \
  -e 's|@''REPLACE_LINK''@|0|g' \
  -e 's|@''REPLACE_LINKAT''@|0|g' \
  -e 's|@''REPLACE_LSEEK''@|0|g' \
  -e 's|@''REPLACE_PREAD''@|0|g' \
  -e 's|@''REPLACE_PWRITE''@|0|g' \
  -e 's|@''REPLACE_READ''@|0|g' \
  -e 's|@''REPLACE_READLINK''@|0|g' \
  -e 's|@''REPLACE_RMDIR''@|0|g' \
  -e 's|@''REPLACE_SLEEP''@|0|g' \
  -e 's|@''REPLACE_SYMLINK''@|0|g' \
  -e 's|@''REPLACE_TTYNAME_R''@|0|g' \
  -e 's|@''REPLACE_UNLINK''@|0|g' \
  -e 's|@''REPLACE_UNLINKAT''@|0|g' \
  -e 's|@''REPLACE_USLEEP''@|0|g' \
  -e 's|@''REPLACE_WRITE''@|0|g' \
  -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|0|g' \
  -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|0|g' \
  -e '/definitions of _gl_GL_FUNCDECL_RPL/r c++defs.h' \
  -e '/definition of _gl_GL_ARG_NONNULL/r arg-nonnull.h' \
  -e '/definition of _gl_GL_WARN_ON_USE/r warn-on-use.h'; \
} > unistd.h-t && \
mv unistd.h-t unistd.h
make[1]: *** [unistd.h] Interrupt

when I split the pipe of 3 seds into 3 separate invocations with
intermediate files, it works just fine (but hangs in the next sed chain)
adding "SHELL = /bin/bash" to the Makefile did nto change anything.

whan do I do now?

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://jihadwatch.org http://memri.org http://mideasttruth.com
http://truepeace.org http://dhimmi.com http://iris.org.il http://camera.org
OK, so you're a Ph.D.  Just don't touch anything.



Re: error: expected ')' before 'int'

2011-03-24 Thread Sam Steingold
> * Sam Steingold  [2011-03-24 10:45:47 -0400]:
>
> I am trying to update gnulib in clisp and clisp no longer compiles:
>
> In file included from ../../src/gllib/close-hook.c:23:
> ./stdlib.h:611: error: expected ')' before 'int'
> ./stdlib.h:729: error: expected ')' before 'int'
> In file included from ../../src/gllib/close-hook.c:24:
> ./unistd.h:290: error: expected ')' before 'int'
> ./unistd.h:812: error: expected ')' before 'int'
> make[3]: *** [close-hook.o] Error 1
>
> clisp hg tip.
> gnulib pulled from git yesterday
> autoconf 2.65
>
> you can find unistd.h and stdlib.h in
> <http://sds.podval.org/data/gnulib.zip>; please tell me which file you
> want me to add there.

This happens after I removed my gnutool-patch which prepended stuff to
gnulib define constants to allow me using gnulib in several projects.
I was lead to believe that gnulib now supported my setup.

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.5 (Final) X
http://thereligionofpeace.com http://palestinefacts.org http://camera.org
http://memri.org http://jihadwatch.org http://dhimmi.com http://www.memritv.org
Failure is not an option. It comes bundled with your Microsoft product.



error: expected ')' before 'int'

2011-03-24 Thread Sam Steingold
Hi,
I am trying to update gnulib in clisp and clisp no longer compiles:

In file included from ../../src/gllib/close-hook.c:23:
./stdlib.h:611: error: expected ')' before 'int'
./stdlib.h:729: error: expected ')' before 'int'
In file included from ../../src/gllib/close-hook.c:24:
./unistd.h:290: error: expected ')' before 'int'
./unistd.h:812: error: expected ')' before 'int'
make[3]: *** [close-hook.o] Error 1

clisp hg tip.
gnulib pulled from git yesterday
autoconf 2.65

you can find unistd.h and stdlib.h in
<http://sds.podval.org/data/gnulib.zip>; please tell me which file you
want me to add there.

thanks!

-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.5 (Final) X
http://truepeace.org http://ffii.org http://palestinefacts.org
http://thereligionofpeace.com http://dhimmi.com
My inferiority complex is the only thing I can be proud of.



Re: error: redefinition of `struct random_data'

2010-10-11 Thread Sam Steingold
Hi Bruno,

On Mon, Oct 11, 2010 at 6:41 PM, Bruno Haible  wrote:
>
> It sounds like you have two invocations for gnulib-tool, one for gllib,
> and one for regexp/gllib.

you must be clairvoyant.

> You probably renamed the inclusion guard (_GL_STDLIB_H)
> appropriate (as recommended).

does this "as recommended" mean that you are now more amenable to
accepting my patch?
http://clisp.cvs.sourceforge.net/viewvc/clisp/clisp/gnulib-tool.patch?view=log

> I think the problem you encountered is not specific to clisp, therefore I'm
> applying approach a).

thanks.

-- 
Sam Steingold <http://sds.podval.org>



module request: gmalloc

2010-10-11 Thread Sam Steingold
some platforms have malloc implementations with extra features like 
randomizations, and some applications cannot handle those features.

thus emacs (and clisp) come with gmalloc.c by Mike Haertel.
It would be nice if it were offered by gnulib, so that I won't have to have my 
own special login to handle the --with-gmalloc configure option and could 
instead get the gmalloc module from gnulib and --with-included-malloc (???) 
would DTRT.

thanks.
Sam.




error: redefinition of `struct random_data'

2010-10-11 Thread Sam Steingold
All of a sudden (after the 27-Sep-10 sync with gnulib) I am getting this error 
when compiling gllib in the regexp clisp module on mingw and cygwin:
gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I/.../current/modules/regexp/gllib -I.. 
-I/.../top/include -I/.../current/build-mingw-g-7/gllib 
-I/.../current/build-mingw-g-7  -g -O2 -W -Wswitch -Wcomment -Wpointer-arith 
-Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare 
-Wno-format-nonliteral -falign-functions=4 -D_WIN32 -g -O0 -DDEBUG_OS_ERROR 
-DDEBUG_SPVW -DDEBUG_BYTECODE -DSAFETY=3 -DENABLE_UNICODE -DNO_TERMCAP_NCURSES 
-DDYNAMIC_FFI -DDYNAMIC_MODULES -DNO_GETTEXT -I.  -DDLL_EXPORT -DPIC 
-I/.../current/build-mingw-g-7/  -MT malloc.o -MD -MP -MF .deps/malloc.Tpo -c 
-o malloc.o /.../current/modules/regexp/gllib/malloc.c

In file included from /.../current/modules/regexp/gllib/malloc.c:
32:./stdlib.h:65: error: redefinition of `struct random_data'
make[4]: *** [malloc.o] Error 1

indeed, I have stdlib.h both in gllib and regexp/gllib.
what has happened?
thanks.
Sam.




Re: gl_* check do nothing?

2010-09-29 Thread Sam Steingold
On Wed, Sep 29, 2010 at 2:17 PM, Eric Blake  wrote:
> On 09/29/2010 12:10 PM, Sam Steingold wrote:
>>
>> Had I realised this earlier, I would not have pulled the getdate
>> module from gnulib.
>> now I have to revert my changes...
>
> Which application are you trying to use this in?

GNU CLISP http://clisp.cons.org

>>>> this part of my configure.in:
>>>
>>> You haven't switched to configure.ac yet?
>> http://www.cygwin.com/acronyms/#PTC :-)
>
> Which project would I be submitting a patch to, anyway?

clisp.
if you are serious, let us talk on clisp-devel.

-- 
Sam Steingold <http://sds.podval.org>



Re: getdate fails to build

2010-09-29 Thread Sam Steingold
On Wed, Sep 29, 2010 at 1:44 PM, Paul Eggert  wrote:
> Renaming the module to get_date would avoid
> confusion like Sam's in the future.  Presumably
> getdate.h would be renamed to get_date.h as well.

yes, please do!

thanks for your explanations!


-- 
Sam Steingold <http://sds.podval.org>



Re: gl_* check do nothing?

2010-09-29 Thread Sam Steingold
On Wed, Sep 29, 2010 at 1:32 PM, Eric Blake  wrote:
> On 09/29/2010 11:25 AM, Eric Blake wrote:
>>
>> On 09/29/2010 10:50 AM, Sam Steingold wrote:
>>>>
>>>> getdate: never supplied by the system.
>>
>> Gnulib and glibc getdate are not synced. There are extensions and bug
>> fixes in gnulib's getdate that have not been ported to glibc. Therefore,
>> use of the gnulib module intentionally avoids the glibc getdate at the
>> moment.
>
> Correction - gnulib getdate provides get_date(), not getdate(), so there is
> nothing to be synced back to glibc.

Too bad.
Had I realised this earlier, I would not have pulled the getdate
module from gnulib.
now I have to revert my changes...

maybe it would be a good idea to rename to module get_date?

-- 
Sam Steingold <http://sds.podval.org>



Re: gl_* check do nothing?

2010-09-29 Thread Sam Steingold
On Wed, Sep 29, 2010 at 11:50 AM, Eric Blake  wrote:
> On 09/29/2010 09:34 AM, Sam Steingold wrote:
>>
>> this part of my configure.in:
>
> You haven't switched to configure.ac yet?

http://www.cygwin.com/acronyms/#PTC :-)

>> AC_FUNC_CHOWN
>> gl_FUNC_MKTIME
>> gl_FUNC_GNU_STRFTIME
>> gl_FUNC_STRPTIME
>> gl_TIME_MODULE_INDICATOR([strptime])
>> gl_GETDATE
>> gl_FUNC_STRVERSCMP
>> gl_STRING_MODULE_INDICATOR([strverscmp])
>> gl_FUNC_UNAME
>> gl_SYS_UTSNAME_MODULE_INDICATOR([uname])
>> gl_FUNC_STRERROR
>> gl_STRING_MODULE_INDICATOR([strerror])
>
> Why are you calling these macros directly?  It's much easier to call a
> single gl_INIT (after gl_INIT_EARLY) to get it all taken care of for you.

because I did not know that gl_INIT called them.
thanks for pointing this out.

>> how do I get the full list of all functions which gnulib actually
>> replaced in the current build?
>
> For all gnulib replacements that follow modern paradigms, the fastest way to
> see what needed replacement is 'grep REPLACE_.\*1 config.log',

no matches.
great!

> although that
> may miss out on a few of the older-style function replacements (for example,
> poll didn't show up in that paradigm until just this week).

are there many of those?

-- 
Sam Steingold <http://sds.podval.org>



Re: getdate fails to build

2010-09-29 Thread Sam Steingold
Bruno,

On Wed, Sep 29, 2010 at 12:33 PM, Bruno Haible  wrote:
> Sam,
>
>> why is getdate built at all on the latest ubuntu?
>> isn't glibc enough there?!
>
> Take a look at the module description (modules/getdate):
>
>  1) It says
>
>       Include:
>       "getdate.h"
>
>     Does glibc have a getdate.h include file?

posix does not require "getdate.h".
gnulib shouldn't either.

every time you replace some glibc functionality, it is a bug.
either in gnulib, or in glibc.


>  2) It says
>
>       Makefile.am:
>       lib_SOURCES += getdate.y
>
>     which means that getdate.y is compiled unconditionally.
>     Whereas platform-dependent compilations are usually triggered
>     through AC_LIBOBJ.

this is a bug in gnulib.

>> /bin/bash /home/sds/src/clisp/current/build-g//build-aux/ylwrap
>> /home/sds/src/clisp/current/modules/syscalls/gllib/getdate.y \
>>                                        y.tab.c getdate.c \
>>                                        y.tab.h getdate.h \
>>                                        y.output getdate.output \
>>                                        -- byacc   && \
>>          mv getdate.c getdate.c-t && \
>>          mv getdate.c-t
>> /home/sds/src/clisp/current/modules/syscalls/gllib/getdate.c
>> byacc: e - line 277 of
>> "/home/sds/src/clisp/current/modules/syscalls/gllib/getdate.y", syntax error
>> %pure-parser
>> ^
>> make[2]: *** [getdate.c] Error 1
>
> The getdate module comes with an autoconf macro gl_GETDATE, which requires
> gl_BISON, found in m4/bison.m4. This macro has a comment
> "# getdate.y works with bison only.", and sets the default value of YACC
> to 'bison -y'. Probably you had YACC set by another macro, and it ended
> up being 'byacc'. Since your package now includes getdate.y, it relies
> on bison. So you can ditch your other macro that determined YACC in a
> more relaxed way, and use bison.m4 instead.

this is another gnulib bug: it should have detected bad YACC at
configure time and failed then.

the bottom line is:
gnulib has no business requiring YACC on linux
gnulib has no business replacing glibc functions on linux

-- 
Sam Steingold <http://sds.podval.org>



Re: gl_* check do nothing?

2010-09-29 Thread Sam Steingold
> getdate: never supplied by the system.

HUH???!!!

$ nm /lib/libc.so.6 | grep getdate
00085620 t __getdate_r
00085b70 T getdate
00157334 B getdate_err
00085620 W getdate_r

-- 
Sam Steingold <http://sds.podval.org>



getdate fails to build

2010-09-29 Thread Sam Steingold
/bin/bash /home/sds/src/clisp/current/build-g//build-aux/ylwrap 
/home/sds/src/clisp/current/modules/syscalls/gllib/getdate.y \

  y.tab.c getdate.c \
  y.tab.h getdate.h \
  y.output getdate.output \
  -- byacc   && \
mv getdate.c getdate.c-t && \
mv getdate.c-t 
/home/sds/src/clisp/current/modules/syscalls/gllib/getdate.c
byacc: e - line 277 of 
"/home/sds/src/clisp/current/modules/syscalls/gllib/getdate.y", syntax error

%pure-parser
^
make[2]: *** [getdate.c] Error 1

why is getdate built at all on the latest ubuntu?
isn't glibc enough there?!

thanks
Sam




gl_* check do nothing?

2010-09-29 Thread Sam Steingold

this part of my configure.in:

==
AC_FUNC_CHOWN
gl_FUNC_MKTIME
gl_FUNC_GNU_STRFTIME
gl_FUNC_STRPTIME
gl_TIME_MODULE_INDICATOR([strptime])
gl_GETDATE
gl_FUNC_STRVERSCMP
gl_STRING_MODULE_INDICATOR([strverscmp])
gl_FUNC_UNAME
gl_SYS_UTSNAME_MODULE_INDICATOR([uname])
gl_FUNC_STRERROR
gl_STRING_MODULE_INDICATOR([strerror])
AC_CHECK_DECLS([signgam],,,[#include ])
==

produces this output:
==
checking for working chown... yes
checking for working mktime... (cached) yes
checking for struct tm.tm_zone... (cached) yes
checking for strverscmp... (cached) yes
checking for uname... (cached) yes
checking whether signgam is declared... yes
==

i.e.,

==
gl_FUNC_GNU_STRFTIME
gl_FUNC_STRPTIME
gl_TIME_MODULE_INDICATOR([strptime])
gl_GETDATE
==

only prints

==
checking for struct tm.tm_zone... (cached) yes
==

while

==
gl_FUNC_STRERROR
gl_STRING_MODULE_INDICATOR([strerror])
==

print NOTHING.

So, does this mean that gnulib NEVER relies on the system-supplied strftime, 
strptime, getdate, strerror?

why?
this is a very current ubuntu so I expected that _none_ of the gnulib code 
would be used.
how do I get the full list of all functions which gnulib actually replaced in 
the current build?


thanks!
Sam.




why does getdate include xalloc-die.c?

2010-09-28 Thread Sam Steingold

does this mean that on memory allocation failure in getdate clisp will exit?
this is no good.




what does regex depend on sys_wait?

2010-09-27 Thread Sam Steingold

why am I seeing this?

Module list with included dependencies (indented):
arg-nonnull
btowc
c++defs
gettext-h
malloc-gnu
malloc-posix
  regex
ssize_t
stddef
stdlib
sys_wait
unistd
warn-on-use
wcrtomb

why are

? modules/regexp/gllib/sys_wait.in.h
? modules/regexp/glm4/sys_wait_h.m4

added to clisp?

thanks.




Re: what is $ac_t ?

2010-09-17 Thread Sam Steingold
Bruno,

On Fri, Sep 17, 2010 at 1:23 PM, Bruno Haible  wrote:
>
>> checking for getrlimit declaration... (cached) install-shextern int getrlimit
>> (enum __rlimit_resource, struct rlimit *);
>
> In all macros that I wrote, you can replace
>
> AC_MSG_RESULT([${ac_t:-
>         }...])
>
> with
>
> AC_MSG_RESULT([
>         ...])

what's the point of "newline + 9 spaces"?
I think it goes out of the way to look different from the normal
configure output and makes grepping logs harder.

why not just AC_MSG_RESULT([...])?

> Like it was done in iconv.m4
> <http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=c9656c46525e79547e2ffe10130e0e8e013e169c>

how about you move clisp/src/m4/proto.m4 to gnulib since you are
already inlining it in iconv.m4?

please consider this an official module request, CC:bug-gnulib@gnu.org


-- 
Sam Steingold <http://sds.podval.org>



Re: module gethostname

2010-09-16 Thread Sam Steingold
Bruno,

On Thu, Sep 16, 2010 at 5:13 PM, Bruno Haible  wrote:
>> now I get a linking error:
>>
>> Warning: resolving _gethostname by linking to _gethostn...@8
>> Use --enable-stdcall-fixup to disable these warnings
>> Use --disable-stdcall-fixup to disable these fixups
>> libgnu_cl.a(sockets.o): In function `close_fd_maybe_socket':
>> /cygdrive/c/sds/dev/current/build-mingw-O-2/gllib/../../src/gllib/sockets.c:44:
>> undefined reference to `_wsaenumnetworkeve...@12'
>> collect2: ld returned 1 exit status
>
> Looks like you need to link with $(LIBSOCKET). I mean, if you want to call
> _gethostn...@8, you need to call gl_sockets_startup first, and this function
> sits in sockets.c and requires linking with $(LIBSOCKET).

LIBSOCKET is -lws2_32 and it is present in the command line generating
the above error.

>> curiously, this happens only when I link the base linking set; the boot 
>> linking
>> set is created just fine
>
> Hmm? clisp's socket.d also needs linking with -lws2_32 on mingw, no?

that's the conundrum...

-- 
Sam Steingold <http://sds.podval.org>



Re: module gethostname

2010-09-16 Thread Sam Steingold

Bruno Haible wrote:

I am now getting

undefined reference to 
`_gethostname_used_without_requesting_gnulib_module_gethostname'


This indicates that you have included gnulib , are using 
gethostname(),
and have not asked for the gnulib module 'gethostname'.
  - If you want to use a POSIX compliant gethostname() function, you need to
request the 'gethostname' module.
  - If you want to use Win32 gethostname() - handling errors in the Win32 way,
and guaranteeing the socket library initialization call yourself - then be
sure to #include , then #undef gethostname, and then #include
 and .


thanks.
now I get a linking error:

Warning: resolving _gethostname by linking to _gethostn...@8
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
libgnu_cl.a(sockets.o): In function `close_fd_maybe_socket':
/cygdrive/c/sds/dev/current/build-mingw-O-2/gllib/../../src/gllib/sockets.c:44:
undefined reference to `_wsaenumnetworkeve...@12'
collect2: ld returned 1 exit status

curiously, this happens only when I link the base linking set; the boot linking 
set is created just fine




module gethostname

2010-09-15 Thread Sam Steingold

The only problem which gethostname module fixes is:

On mingw, this function has a prototype that differs from that
specified by POSIX, and it is defined only in the ws2_32 library.

why does it have such extensive dependencies? (sockets! errno!)

I have to reiterate my complaint that the gnulib dependencies mean that one has 
to include (almost) the whole of gnulib if one includes (almost) any part thereof.


the case in question is that I am now getting

undefined reference to 
`_gethostname_used_without_requesting_gnulib_module_gethostname'


gcc errors on mingw and I have to figure out which gnulib module did this to me.




Re: feature request: detect CPU instruction set

2010-09-03 Thread Sam Steingold

Bruno Haible wrote:

  AH_TOP([/* CPU and C ABI indicator */
#ifndef __i386__
#undef __i386__
#endif
#ifndef __x86_64__
#undef __x86_64__
#endif
#ifndef __alpha__
#undef __alpha__
#endif
#ifndef __arm__
#undef __arm__
#endif
#ifndef __armel__
#undef __armel__
#endif
#ifndef __hppa__
#undef __hppa__
#endif
#ifndef __hppa64__
#undef __hppa64__
#endif
#ifndef __ia64__
#undef __ia64__
#endif
#ifndef __m68k__
#undef __m68k__
#endif
#ifndef __mips__
#undef __mips__
#endif
#ifndef __mipsn32__
#undef __mipsn32__
#endif
#ifndef __mips64__
#undef __mips64__
#endif
#ifndef __powerpc__
#undef __powerpc__
#endif
#ifndef __powerpc64__
#undef __powerpc64__
#endif
#ifndef __s390__
#undef __s390__
#endif
#ifndef __s390x__
#undef __s390x__
#endif
#ifndef __sh__
#undef __sh__
#endif
#ifndef __sparc__
#undef __sparc__
#endif
#ifndef __sparc64__
#undef __sparc64__
#endif
])


what is this?
how is it supposed to be used?
I only see it in:
$ grep -r 'CPU and C ABI indicator' .
./glm4/host-cpu-c-abi.m4:  AH_TOP([/* CPU and C ABI indicator */
./aclocal.m4:  AH_TOP([/* CPU and C ABI indicator */
$

does it somehow replace
=
/* CPU */
#ifndef __i386__
#undef __i386__
#endif
#ifndef __m68k__
#undef __m68k__
#endif
#ifndef __mips__
#undef __mips__
#endif
#ifndef __mipsn32__
#undef __mipsn32__
#endif
#ifndef __mips64__
#undef __mips64__
#endif
#ifndef __sparc__
#undef __sparc__
#endif
#ifndef __sparc64__
#undef __sparc64__
#endif
#ifndef __alpha__
#undef __alpha__
#endif
#ifndef __hppa__
#undef __hppa__
#endif
#ifndef __arm__
#undef __arm__
#endif
#ifndef __powerpc__
#undef __powerpc__
#endif
#ifndef __powerpc64__
#undef __powerpc64__
#endif
#ifndef __s390__
#undef __s390__
#endif
#ifndef __m88k__
#undef __m88k__
#endif
#ifndef __convex__
#undef __convex__
#endif
#ifndef __ia64__
#undef __ia64__
#endif
#ifndef __x86_64__
#undef __x86_64__
#endif
=
in, e.g., vacall.h.in?



Re: module request: sockets.m4

2010-09-01 Thread Sam Steingold
Hi Bruno,

On 9/1/10, Bruno Haible  wrote:
>
>  > I want to include sockets.m4 and nothing else (I need LIBSOCKET to replace
>  > clisp/src/m4/socket.m4).
>  > Is it possible to add a module which would only include that one file?
>
> You can get this file by invoking
>gnulib-tool --copy-file m4/sockets.m4 src/m4/socket.m4

thanks.

>  But note that we don't guarantee stability (modulo changes listed in the NEWS
>  file) only for entire modules. In other words, the naming and contents of a 
> .m4
>  file may change without notice.

Ok, so please do create a module and guarantee the stability. :-)

-- 
Sam Steingold <http://sds.podval.org>



module request: sockets.m4

2010-09-01 Thread Sam Steingold

Hi,
I want to include sockets.m4 and nothing else (I need LIBSOCKET to replace 
clisp/src/m4/socket.m4).

Is it possible to add a module which would only include that one file?
thanks
Sam.




Re: feature request: detect CPU instruction set

2010-08-31 Thread Sam Steingold
Hi Bruno,

On 8/31/10, Bruno Haible  wrote:
>
> It apparently depends for whom the code should be readable.
since you will be maintaining the code, it is your choice.

>  So, except for code style, you are fine with that proposed module?
yes.

-- 
Sam Steingold <http://sds.podval.org>



  1   2   3   >