From: chrubis@suse.cz
To: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] safe_touch and utimensat
Date: Thu, 14 Nov 2013 16:06:36 +0100 [thread overview]
Message-ID: <20131114150635.GA15449@rei> (raw)
In-Reply-To: <1384353022-9088-1-git-send-email-stanislav.kholmanskikh@oracle.com>
Hi!
> Some distributions (RHEL5, for instance) don't have defined utimensat()
> system call. So I introduced an autoconf check for this, otherwise safe_file_ops.c can
> not be compiled on these distributions.
>
> Actually, I'm not satisfied with
> utimes(pathname, NULL)
> because it throws away the time-changing logic from safe_touch().
>
> How do you think it is safe to explicitly define UTIME_* constants in LTP
> sources (safe_file_ops.h):
>
> #ifndef UTIME_NOW
> #define UTIME_NOW ((1l << 30) - 1l)
> #endif
>
> #ifndef UTIME_OMIT
> #define UTIME_OMIT ((1l << 30) - 2l)
> #endif
That shouldn't be a problem. These constants are part of ABI they will
not change in future.
Actually LTP has several places where such defines are used in order not
to overcomplicate the autoconf checks.
But I would like to start sticking these into a specific directory under
include/. For example to put these two into include/lapi/utime.h and
include it from the safe_file_ops.h.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2013-11-14 15:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 14:30 [LTP] safe_touch and utimensat Stanislav Kholmanskikh
2013-11-13 14:30 ` [LTP] [RFC PATCH 1/2] autoconf check for utimensat(2) Stanislav Kholmanskikh
2013-11-14 15:08 ` chrubis
2013-11-21 18:22 ` Mike Frysinger
2013-11-13 14:30 ` [LTP] [RFC PATCH 2/2] safe_touch: use utimes(2) if utimensat(2) is not defined Stanislav Kholmanskikh
2013-11-14 15:06 ` chrubis [this message]
2013-11-26 16:06 ` [LTP] safe_touch and utimensat chrubis
[not found] ` <5296FAB8.8050702@oracle.com>
2013-11-28 11:36 ` chrubis
2013-11-29 7:58 ` [LTP] [PATCH V2 1/3] autoconf check for utimensat(2) Stanislav Kholmanskikh
2013-11-29 7:58 ` [LTP] [PATCH V2 2/3] created lapi/utime.h Stanislav Kholmanskikh
2013-11-29 7:58 ` [LTP] [PATCH V2 3/3] safe_touch: use utimes(2) if utimensat(2) is not defined Stanislav Kholmanskikh
2013-12-02 18:27 ` chrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131114150635.GA15449@rei \
--to=chrubis@suse.cz \
--cc=ltp-list@lists.sourceforge.net \
--cc=stanislav.kholmanskikh@oracle.com \
--cc=vasily.isaenko@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox