# Copyright (C) 2007 Phil Betts # This file is free software; I give unlimited permission to copy and/or # distribute it, with or without modifications, as long as this notice is # preserved. # This file is to help the detection and reporting of errors caused by missing # DLLs in cygwin. In order to prevent non-interactive scripts displaying dialog # boxes when an error is detected, cygwin programs disable the dialog box. This # has the unfortunate side effect of making linkage errors go unreported. # The file contains two methods for detecting and reporting the error, # The first, using the PROMPT_COMMAND environment variable will be suitable for # most users. # The second, using trap is more prone to being accidentally disabled, so it is # not used by default. # If you are reading this because you wish to set $PROMPT_COMMAND to something # different, please set the following variable to 1. TRAP53=0 if [ $TRAP53 -eq 0 ];then declare -r PROMPT_COMMAND=' if [ $? = 53 ];then echo "Missing DLL." echo "Run cygcheck on the executable to identify the missing file" echo "Then use the cygwin setup package search at:" echo " http://cygwin.com/packages/" echo "to identify which package contains the missing file" fi # Before changing PROMPT_COMMAND, please read /etc/profile.d/dllcheck.sh' else trap ' if [ $? = 53 ];then echo "Missing DLL." echo "Run cygcheck on the executable to identify the missing file" echo "Then use the cygwin setup package search at:" echo " http://cygwin.com/packages/" echo "to identify which package contains the missing file" echo "Run cygcheck on the executable to identify the missing file" fi' ERR fi