utimens: fix regression on Solaris 20100219093019/gnulib 20100220040512/gnulib 20100221040520/gnulib 20100222040508/gnulib 20100223040526/gnulib 20100224040512/gnulib 20100225040506/gnulib 20100226040508/gnulib 20100227040506/gnulib 20100228040509/gnulib 20100301040511/gnulib 20100302040526/gnulib 20100303040503/gnulib 20100304040503/gnulib 20100305040503/gnulib 20100306040503/gnulib 20100307040504/gnulib 20100308040506/gnulib 20100309040527/gnulib 20100310040505/gnulib 20100311040503/gnulib 20100312040506/gnulib 20100313040505/gnulib 20100314040516/gnulib 20100315040510/gnulib 20100316040524/gnulib 20100317040506/gnulib 20100318040503/gnulib 20100319040503/gnulib 20100320040502/gnulib 20100321040506/gnulib 20100322040515/gnulib 20100323040521/gnulib 20100324040506/gnulib
authorEric Blake <ebb9@byu.net>
Wed, 18 Nov 2009 13:59:44 +0000 (06:59 -0700)
committerEric Blake <ebb9@byu.net>
Wed, 18 Nov 2009 13:59:44 +0000 (06:59 -0700)
commit0883405cc751858a633bebc56acb75381a6e50c8
tree69103ad2238a720bc15605d834aadd55d349503b
parent6038ee4b827caaf05fa37dbb2304fedb9d0cd6c7
utimens: fix regression on Solaris

Revert commit 26c5fd742f.  Solaris lacks futimens and futimes, so
futimesat is the only way to change fd timestamps.  But since
FreeBSD futimesat can't change fd timestamps, we need a configure
check to avoid the crash there.

* m4/utimens.m4 (gl_UTIMENS): Check for BSD bug.
* lib/utimens.c (fdutimens): Revert 2009-11-08 change; Solaris 10
can only change fd timestamps via futimesat.  Instead, use an
additional witness macro to avoid BSD bug.
Reported by Jim Meyering.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/utimens.c
m4/utimens.m4