Changeset 3208 for trunk/src/misc
- Timestamp:
- Mar 29, 2018, 5:54:02 AM (7 years ago)
- Location:
- trunk/src/misc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/misc/Makefile.kmk
r2413 r3208 31 31 kmk_time_DEFS = KBUILD_SVN_REV=$(KBUILD_SVN_REV) 32 32 kmk_time_SOURCES = kmk_time.c 33 kmk_time_SOURCES.win = ../lib/quote_argv.c 33 34 34 35 include $(KBUILD_PATH)/subfooter.kmk -
trunk/src/misc/kmk_time.c
r2546 r3208 40 40 # include <process.h> 41 41 # include <Windows.h> 42 # include "quote_argv.h" 42 43 #else 43 44 # include <unistd.h> … … 194 195 int cTimes = 1; 195 196 #if defined(_MSC_VER) 197 int fUnquoted = 0; 196 198 FILETIME ftStart, ft; 197 199 unsigned _int64 usMin, usMax, usAvg, usTotal, usCur; … … 233 235 else if (!strcmp(psz, "-iterations")) 234 236 psz = "i"; 237 #if defined(_MSC_VER) 238 else if (!strcmp(psz, "-unquoted")) 239 { 240 fUnquoted = 1; 241 continue; 242 } 243 #endif 235 244 } 236 245 … … 243 252 case 'V': 244 253 printf("kmk_time - kBuild version %d.%d.%d (r%u)\n" 245 "Copyright (C) 2007-20 09knut st. osmundsen\n",254 "Copyright (C) 2007-2018 knut st. osmundsen\n", 246 255 KBUILD_VERSION_MAJOR, KBUILD_VERSION_MINOR, KBUILD_VERSION_PATCH, 247 256 KBUILD_SVN_REV); … … 287 296 * Execute the program (it's actually supposed to be a command I think, but wtf). 288 297 */ 289 290 298 #if defined(_MSC_VER) 291 /** @todo 292 * We'll have to find the '--' in the commandline and pass that 293 * on to CreateProcess or spawn. Otherwise, the argument qouting 294 * is gonna be messed up. 295 */ 299 if (!fUnquoted) 300 { 301 if (quote_argv(argc - i, &argv[i], 0 /*fWatcomBrainDamage*/, 0 /*fFreeOrLeak*/) != 0) 302 { 303 fprintf(stderr, "%s: error: quote_argv failed\n"); 304 return 8; 305 } 306 } 307 296 308 GetSystemTimeAsFileTime(&ftStart); 297 309 rc = _spawnvp(_P_WAIT, argv[i], &argv[i]);
Note:
See TracChangeset
for help on using the changeset viewer.