|
From: Motiejus J. <des...@gm...> - 2012-09-25 07:50:20
|
On Tue, Sep 25, 2012 at 09:13:57AM +0200, Jan Stary wrote:
> > These are not used anywhere in sox
>
> What makes you say that? util.h says
Late night I guess. :)
> #ifdef _stati64
> #define stat _stati64
> #else
> #define stat _stat
> #endif
>
> So on a system which does have _stati64,
> that is used as 'stat'.
i586-mingw32msvc/include/sys/stat.h:
struct _stati64 {
_dev_t st_dev;
...
};
That way if "util.h" is included before <sys/stat.h>, the latter is
translated to
struct stat { /* replaced by macro defined in "util.h" /*
_dev_t st_dev;
...
};
> (Not that I know a system with _stati64.)
mingw32 4.2.1.dfsg-2ubuntu1
> Well, isn't 'stat' defined on every reasonable system?
> Isn't the purpose of the above to redefine it?
It is. But it is redefining it incorrectly (_stati64 is not a macro,
it's a struct!).
> Which might be strange: a system with _stati64
> is probably already using it as its own stat, right?
I guess so. This is really clumsy.
> I don't know why sox doesn't just use the given
> system's stat everywhere.
"util.h" is really strange. Maybe somebody knows why:
1. sox checking for _stati64 constant?
2. sox redefining stat?
I was trying to solve the issue doing least impact possible, wrongly. It
would be nice if somebody could explain what was the intent behind these
stat redefinitions.
Regards,
Motiejus
|