On 02/12/2016 01:05 PM, Yaakov Selkowitz wrote: >> Off the top of my head, I don't know. Usually only a change to >> child_info.h should affect CHILD_INFO_MAGIC. Unless the preprocessed >> output of gcc differs for some reason. > > It turns out it does. Anything that is substituted by preprocessor is > placed on its own line with gcc-5, e.g. with NULL and _SYMSTR:
Does the use of -P during preprocessing, to inhibit line markers, force gcc to quit adding extra lines? In my quick testing with Fedora's gcc 5.3.1: $ printf '#include <stddef.h>\nstart NULL end\n' \ | gcc -E - | sed -n '/start/,$ p' start # 2 "<stdin>" 3 4 ((void *)0) # 2 "<stdin>" end $ printf '#include <stddef.h>\nstart NULL end\n' \ | gcc -E -P - | sed -n '/start/,$ p' start ((void *)0) end > -extern child_info_spawn *spawn_info asm ("_" "child_proc_info"); > -extern child_info_fork *fork_info asm ("_" "child_proc_info"); > +extern child_info_spawn *spawn_info asm ( > + "_" If it were merely a case of more vs. less whitespace, we could postprocess (turn all newlines and space sequences into a single space); but this is a case of introducing whitespace, making the problem trickier, if -P doesn't work. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature