aboutsummaryrefslogtreecommitdiff
path: root/coreutils/touch.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-08-22 14:56:12 +0100
committerRon Yorston <rmy@pobox.com>2017-08-22 14:56:12 +0100
commitce9af1cc5ea23f754587448cf35b5120c77bfeef (patch)
tree69e5eaba5e75ab909ed92d5045393471b8ff3c13 /coreutils/touch.c
parentc170026700eabb10147dd848c45c06995b43a32e (diff)
parente837a0dbbebf4229306df98fe9ee3b9bb30630c4 (diff)
downloadbusybox-w32-ce9af1cc5ea23f754587448cf35b5120c77bfeef.tar.gz
busybox-w32-ce9af1cc5ea23f754587448cf35b5120c77bfeef.tar.bz2
busybox-w32-ce9af1cc5ea23f754587448cf35b5120c77bfeef.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'coreutils/touch.c')
-rw-r--r--coreutils/touch.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 11b40d427..857761578 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -103,6 +103,11 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
103 "date\0" Required_argument "d" 103 "date\0" Required_argument "d"
104 IF_FEATURE_TOUCH_NODEREF("no-dereference\0" No_argument "h") 104 IF_FEATURE_TOUCH_NODEREF("no-dereference\0" No_argument "h")
105 ; 105 ;
106# define GETOPT32 getopt32long
107# define LONGOPTS ,touch_longopts
108# else
109# define GETOPT32 getopt32
110# define LONGOPTS
106# endif 111# endif
107 char *reference_file = NULL; 112 char *reference_file = NULL;
108 char *date_str = NULL; 113 char *date_str = NULL;
@@ -112,17 +117,17 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
112# define reference_file NULL 117# define reference_file NULL
113# define date_str NULL 118# define date_str NULL
114# define timebuf ((struct timeval*)NULL) 119# define timebuf ((struct timeval*)NULL)
120# define GETOPT32 getopt32
121# define LONGOPTS
115#endif 122#endif
116 123
117#if ENABLE_FEATURE_TOUCH_SUSV3 && ENABLE_LONG_OPTS
118 applet_long_options = touch_longopts;
119#endif
120 /* -d and -t both set time. In coreutils, 124 /* -d and -t both set time. In coreutils,
121 * accepted data format differs a bit between -d and -t. 125 * accepted data format differs a bit between -d and -t.
122 * We accept the same formats for both */ 126 * We accept the same formats for both */
123 opts = getopt32(argv, "c" IF_FEATURE_TOUCH_SUSV3("r:d:t:") 127 opts = GETOPT32(argv, "c" IF_FEATURE_TOUCH_SUSV3("r:d:t:")
124 IF_FEATURE_TOUCH_NODEREF("h") 128 IF_FEATURE_TOUCH_NODEREF("h")
125 /*ignored:*/ "fma" 129 /*ignored:*/ "fma"
130 LONGOPTS
126 IF_FEATURE_TOUCH_SUSV3(, &reference_file) 131 IF_FEATURE_TOUCH_SUSV3(, &reference_file)
127 IF_FEATURE_TOUCH_SUSV3(, &date_str) 132 IF_FEATURE_TOUCH_SUSV3(, &date_str)
128 IF_FEATURE_TOUCH_SUSV3(, &date_str) 133 IF_FEATURE_TOUCH_SUSV3(, &date_str)