GNU bug report logs - #6555
stat enhancement

Previous Next

Package: coreutils;

Reported by: A Burgie <dajoker <at> gmail.com>

Date: Fri, 2 Jul 2010 20:55:01 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 6555 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: A Burgie <dajoker <at> gmail.com>
Cc: 6555 <at> debbugs.gnu.org
Subject: Re: bug#6555: stat enhancement
Date: Tue, 06 Jul 2010 22:53:40 +0100
On 06/07/10 19:18, A Burgie wrote:
> Is there any documentation on doing this the right (meaning, GNU) way?
>  I've separated out find_mount_point() into a separate .c file,
> created a .h file, put both in ./gnulib/lib and linked-to them from
> lib, included the .h file in stat.c and df.c, but cannot compile
> (w/make).  I believe I still need to modify a makefile to include the
> findmountpoint.c file somewhere but have never worked w/make except as
> an end user (./configure && make && make install).  Also I do not know
> that I am using the correct directories (./gnulib/lib) for my new .c
> and .h files.

lib/ is for gnulib stuff so best avoided.
Have a look at how a function was extracted to a separate file previously.
For example, search for "operand2sig" in `git show 265c4b83`

> My current error makes me think I'm missing something
> else that's probably obvious:
> 
>   CC     stat.o
> stat.c: In function 'print_stat':
> stat.c:686:7: error: a label can only be part of a statement and a
> declaration is not a statement
> stat.c: At top level:

is your case 'm': typoed?

> ../lib/findmountpoint.h:28:1: warning: 'find_mount_point' used but never defined

that'll probably be sorted if you follow what was done for operand2sig

cheers,
Pádraig.




This bug report was last modified 14 years and 273 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.