zsh-workers
 help / color / mirror / code / Atom feed
* stat on Linux/x86_64 (was: zsh on Opteron (Linux) and limit)
       [not found]     ` <20050217165423.GN19378@ay.vinc17.org>
@ 2005-02-18 13:45       ` Vincent Lefevre
  2005-02-18 13:53         ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Lefevre @ 2005-02-18 13:45 UTC (permalink / raw)
  To: zsh-workers

[I'm sending this reply from zsh-users to zsh-workers; I'm not
subscribed to zsh-workers, make sure I'm Cc'ed in the replies.
Thanks.]

On 2005-02-17 17:54:23 +0100, Vincent Lefevre wrote:
> and if I use the stat builtin with ~hc/bin/zsh, I get:
> 
> Shell compiled with wrong ino_t size
> Shell compiled with wrong off_t size

Concerning this problem, here's an excerpt of my config.log:

[...]
configure:8246: checking if long is 64 bits
configure:8263: gcc -o conftest  -Wall -Wmissing-prototypes -ggdb  -g conftest.c -ldl -lnsl -lcurses -lm  -lc >&5
configure:8266: $? = 0
configure:8268: ./conftest
configure:8271: $? = 0
configure:8285: result: yes
configure:8799: checking for sigset_t
[...]

In the configure.ac file:

 Note that ZSH_64_BIT_TYPE, OFF_T_IS_64_BIT, INO_T_IS_64_BIT do *not* get
 defined if long is already 64 bits, since in that case no special handling
 is required.

Are you sure?

In the Src/Modules/stat.c file:

    case ST_INO:
#ifdef INO_T_IS_64_BIT
        convbase(optr, sbuf->st_ino, 0);
#else
        DPUTS(sizeof(sbuf->st_ino) > 4,
              "Shell compiled with wrong ino_t size");
        statulprint((unsigned long)sbuf->st_ino, optr);
#endif
        break;

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: stat on Linux/x86_64 (was: zsh on Opteron (Linux) and limit)
  2005-02-18 13:45       ` stat on Linux/x86_64 (was: zsh on Opteron (Linux) and limit) Vincent Lefevre
@ 2005-02-18 13:53         ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2005-02-18 13:53 UTC (permalink / raw)
  To: Vincent Lefevre, Zsh hackers list

Vincent Lefevre wrote:
> In the Src/Modules/stat.c file:
> 
>     case ST_INO:
> #ifdef INO_T_IS_64_BIT
>         convbase(optr, sbuf->st_ino, 0);
> #else
>         DPUTS(sizeof(sbuf->st_ino) > 4,
>               "Shell compiled with wrong ino_t size");
>         statulprint((unsigned long)sbuf->st_ino, optr);
> #endif
>         break;

Thanks for noticing.

Looks like that debugging test is wrong; presumably sizeof(unsigned
long) is 8 and the error message goes away.  Indeed, != might have been
better than > but I'm too cowardly.

Index: Src/Modules/stat.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/stat.c,v
retrieving revision 1.7
diff -u -r1.7 stat.c
--- Src/Modules/stat.c	2 Jun 2004 22:15:00 -0000	1.7
+++ Src/Modules/stat.c	18 Feb 2005 13:51:26 -0000
@@ -239,7 +239,7 @@
 #ifdef INO_T_IS_64_BIT
 	convbase(optr, sbuf->st_ino, 0);
 #else
-	DPUTS(sizeof(sbuf->st_ino) > 4,
+	DPUTS(sizeof(sbuf->st_ino) > sizeof(unsigned long),
 	      "Shell compiled with wrong ino_t size");
 	statulprint((unsigned long)sbuf->st_ino, optr);
 #endif
@@ -269,7 +269,7 @@
 #ifdef OFF_T_IS_64_BIT
 	convbase(optr, sbuf->st_size, 0);
 #else
-	DPUTS(sizeof(sbuf->st_size) > 4,
+	DPUTS(sizeof(sbuf->st_size) > sizeof(unsigned long),
 	      "Shell compiled with wrong off_t size");
 	statulprint((unsigned long)sbuf->st_size, optr);
 #endif

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-18 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20050215125144.GI19378@ay.vinc17.org>
     [not found] ` <20050215125815.GA17248@scowler.net>
     [not found]   ` <20050215155912.GN19378@ay.vinc17.org>
     [not found]     ` <20050217165423.GN19378@ay.vinc17.org>
2005-02-18 13:45       ` stat on Linux/x86_64 (was: zsh on Opteron (Linux) and limit) Vincent Lefevre
2005-02-18 13:53         ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).