public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
Cc: vasily.isaenko@oracle.com, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [RFC PATCH 1/2] autoconf check for utimensat(2)
Date: Thu, 14 Nov 2013 16:08:42 +0100	[thread overview]
Message-ID: <20131114150841.GB15449@rei> (raw)
In-Reply-To: <1384353022-9088-2-git-send-email-stanislav.kholmanskikh@oracle.com>

Hi!
> +AC_DEFUN([LTP_CHECK_SYSCALL_UTIMENSAT],[
> +	AC_MSG_CHECKING([for utimensat])
> +	AC_LINK_IFELSE([AC_LANG_SOURCE([
> +#include <stdlib.h>
> +#include <sys/stat.h>
> +#include <fcntl.h>
> +
> +int main(void) {
> +	long tv_nsec;
> +	tv_nsec = UTIME_NOW;
> +	tv_nsec = UTIME_OMIT;
> +
> +	return utimensat(AT_FDCWD, (const char *) "/dev/null", NULL, 0);
> +}])],[has_utimensat="yes"])

Why the cast to const char* and why cannot be the second parameter NULL
too (it's just linked not executed)?

> +
> +if test "x$has_utimensat" == "xyes"; then
> +	AC_DEFINE(HAVE_UTIMENSAT, 1, [Define to 1 if you have utimensat(2)])
> +	AC_MSG_RESULT(yes)
> +else
> +	AC_MSG_RESULT(no)
> +fi
> +])

-- 
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

  reply	other threads:[~2013-11-14 15:08 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 [this message]
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 ` [LTP] safe_touch and utimensat chrubis
2013-11-26 16:06 ` 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=20131114150841.GB15449@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