* dcrt0.cc (_dll_crt0): Check for changes in child_info size. (multiple_cygwin_problem): Avoid "proc" errors when testing. Just assume new cygwin proc. * shared_info.h (mount_info): Add 'cb' element for sanity checks. (shared_info): Ditto. * child_info.h (child_info): Add fhandler_union_size element for sanity checking. * shared.cc (open_shared): Detect shared region size mismatch between parent and child. (shared_info::initialize): Detect shared region size mismatch with expectation. (memory_Init): Ditto. * sigproc.cc (init_child_info): Correctly set cb in passed structure. * shared.cc (open_shared):
		
			
				
	
	
		
			21 lines
		
	
	
		
			741 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			741 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
file_magic=$1; shift
 | 
						|
gcc=$1; shift
 | 
						|
file=$1; shift
 | 
						|
trap "rm -f /tmp/$$.magic" 0 1 2 15
 | 
						|
cat <<EOF > $file_magic
 | 
						|
/* autogenerated - do not edit */
 | 
						|
#include "$file"
 | 
						|
EOF
 | 
						|
while [ -n "$1" ]; do
 | 
						|
    define=$1; shift
 | 
						|
    struct=$1; shift
 | 
						|
    sum=`$gcc -E $file | sed -n "/^$struct/,/^};/p" | sed -e 's/[ 	]//g' -e '/^$/d' | sum | awk '{print "obase=16;\"0x\";", $1}' | bc | tr '[A-Z]' '[a-z]'`
 | 
						|
    echo "#define $define $sum"
 | 
						|
    curr=`sed -n "s/^#[ 	]*define CURR_$define[ 	][ 	]*\([^ 	][^ 	]*\)/\1/p" $file`
 | 
						|
    [ "$curr" == "$sum" ] || echo "*** WARNING WARNING WARNING WARNING WARNING ***
 | 
						|
*** $file: magic number for $define changed old $curr != new $sum
 | 
						|
*** WARNING WARNING WARNING WARNING WARNING ***" 1>&2
 | 
						|
done >> $file_magic
 | 
						|
exit 0
 |