* popuperr instead of win32err

This commit is contained in:
Tomas Hajny 2004-12-05 14:12:34 +00:00
parent bb2b3ed172
commit 572fe34515
3 changed files with 71 additions and 21 deletions

View File

@ -1,11 +1,11 @@
#
# Don't edit, this file is generated by FPCMake Version 1.1 [2004/11/09]
# Don't edit, this file is generated by FPCMake Version 1.1 [2004/12/05]
#
default: all
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom morphos netwlibc
BSDs = freebsd netbsd openbsd darwin
UNIXs = linux $(BSDs) sunos qnx
LIMIT83fs = go32v2 os2
LIMIT83fs = go32v2 os2 emx watcom
FORCE:
.PHONY: FORCE
override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
@ -219,7 +219,7 @@ ifeq ($(UNITSDIR),)
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
endif
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
override CLEAN_UNITS+=erroru win32err ptest
override CLEAN_UNITS+=erroru popuperr ptest
override INSTALL_FPCPACKAGE=y
override COMPILER_TARGETDIR+=$(FULL_TARGET)
ifdef REQUIRE_UNITSDIR
@ -288,7 +288,15 @@ INSTALL_BINDIR:=$(INSTALL_PREFIX)/bin
else
INSTALL_BINDIR:=$(INSTALL_BASEDIR)/bin
ifdef INSTALL_FPCPACKAGE
ifdef CROSSCOMPILE
ifdef CROSSINSTALL
INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(FULL_SOURCE)
else
INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(FULL_TARGET)
endif
else
INSTALL_BINDIR:=$(INSTALL_BINDIR)/$(FULL_TARGET)
endif
endif
endif
endif
@ -548,7 +556,7 @@ HASSHAREDLIB=1
ZIPSUFFIX=darwin
endif
ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
FPCMADE=fpcmade$(FPCMADEEXT)
FPCMADE=fpcmade.$(FPCMADEEXT)
else
FPCMADE=fpcmade.$(FULL_TARGET)
endif
@ -1497,18 +1505,13 @@ erroru$(PPUEXT) : erroru.pp
$(TESTCOMPILER) erroru.pp
ptest$(PPUEXT) : ../test/cg/ptest.pp
$(TESTCOMPILER) ../test/cg/ptest.pp
ifeq ($(OS_TARGET),win32)
win32err$(PPUEXT) : win32err.pp
$(TESTCOMPILER) win32err.pp
endif
popuperr$(PPUEXT) : popuperr.pp
$(TESTCOMPILER) popuperr.pp
ifdef CCOMPILER
../test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o : ../test/cg/obj/ctest.c
$(CCOMPILER) -c -o ../test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o ../test/cg/obj/ctest.c
endif
extra : erroru$(PPUEXT) ptest$(PPUEXT) ../test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o
ifeq ($(OS_TARGET),win32)
extra : win32err$(PPUEXT)
endif
extra : erroru$(PPUEXT) ptest$(PPUEXT) popuperr$(PPUEXT) ../test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o
all : rtl extra
clean : cleanrtl cleanall
clean_ctest :

View File

@ -8,7 +8,7 @@
fpcpackage=y
[clean]
units = erroru win32err ptest
units = erroru popuperr ptest
[compiler]
targetdir=$(FULL_TARGET)
@ -57,10 +57,8 @@ erroru$(PPUEXT) : erroru.pp
ptest$(PPUEXT) : ../test/cg/ptest.pp
$(TESTCOMPILER) ../test/cg/ptest.pp
ifeq ($(OS_TARGET),win32)
win32err$(PPUEXT) : win32err.pp
$(TESTCOMPILER) win32err.pp
endif
popuperr$(PPUEXT) : popuperr.pp
$(TESTCOMPILER) popuperr.pp
ifdef CCOMPILER
../test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o : ../test/cg/obj/ctest.c
@ -68,11 +66,8 @@ ifdef CCOMPILER
endif
extra : erroru$(PPUEXT) ptest$(PPUEXT) ../test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o
extra : erroru$(PPUEXT) ptest$(PPUEXT) popuperr$(PPUEXT) ../test/cg/obj/$(OS_TARGET)/$(CPU_TARGET)/ctest.o
ifeq ($(OS_TARGET),win32)
extra : win32err$(PPUEXT)
endif
#############################

52
tests/units/popuperr.pp Normal file
View File

@ -0,0 +1,52 @@
{
$Id$
This file is part of the Free Pascal test suite.
Copyright (c) 1999-2004 by the Free Pascal development team.
Used to avoid getting pop up windows for critical errors under Windows
and OS/2 operating systems (extension of win32err unit by Pierre Muller).
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
unit popuperr;
interface
implementation
{$ifdef win32}
uses
windows;
{$endif win32}
{$IFDEF OS2}
function _DosError (Error: longint): longint; cdecl;
external 'DOSCALLS' index 212;
{$ENDIF OS2}
begin
{$ifdef win32}
SetErrorMode(
SEM_FAILCRITICALERRORS or
SEM_NOGPFAULTERRORBOX or
SEM_NOOPENFILEERRORBOX);
{$endif win32}
{$IFDEF OS2}
if os_Mode = osOS2 then _DosError (0);
{$ENDIF OS2}
end.
{
$Log$
Revision 1.1 2004-12-05 14:12:34 hajny
* popuperr instead of win32err
}