Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: stat on Linux/x86_64 (was: zsh on Opteron (Linux) and limit)
- X-seq: zsh-workers 20823
- From: Peter Stephenson <pws@xxxxxxx>
- To: Vincent Lefevre <vincent@xxxxxxxxxx>, zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: stat on Linux/x86_64 (was: zsh on Opteron (Linux) and limit)
- Date: Fri, 18 Feb 2005 13:53:37 +0000
- In-reply-to: <20050218134534.GA25272@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20050215125144.GI19378@xxxxxxxxxxxxx> <20050215125815.GA17248@xxxxxxxxxxx> <20050215155912.GN19378@xxxxxxxxxxxxx> <20050217165423.GN19378@xxxxxxxxxxxxx> <20050218134534.GA25272@xxxxxxxxxxxxx>
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@xxxxxxx> 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.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author