aboutsummaryrefslogtreecommitdiff
path: root/coreutils/touch.c
diff options
context:
space:
mode:
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)