comparison toys/posix/mkfifo.c @ 674:7e846e281e38

New build infrastructure to generate FLAG_ macros and TT alias, #define FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate.
author Rob Landley <rob@landley.net>
date Mon, 08 Oct 2012 00:02:30 -0500
parents 6df4ccc0acbe
children 786841fdb1e0
comparison
equal deleted inserted replaced
673:c102f31a753e 674:7e846e281e38
17 usage: mkfifo [fifo_name...] 17 usage: mkfifo [fifo_name...]
18 18
19 Create FIFOs (named pipes). 19 Create FIFOs (named pipes).
20 */ 20 */
21 21
22 #define FOR_mkfifo
22 #include "toys.h" 23 #include "toys.h"
23 24
24 DEFINE_GLOBALS( 25 GLOBALS(
25 char *m_string; 26 char *m_string;
26 mode_t mode; 27 mode_t mode;
27 ) 28 )
28
29 #define TT this.mkfifo
30 #define FLAG_m (1)
31 29
32 void mkfifo_main(void) 30 void mkfifo_main(void)
33 { 31 {
34 char **s; 32 char **s;
35 33