mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 14:31:38 +01:00 
			
		
		
		
	* fix cdecl name problems (patch from Tomas)
This commit is contained in:
		
							parent
							
								
									44bf61f445
								
							
						
					
					
						commit
						9984dd16b0
					
				| @ -175,19 +175,19 @@ function dpmi_set_coprocessor_emulation(flag : longint) : longint; | |||||||
| function __djgpp_set_sigint_key(new_key : longint) : longint;cdecl; | function __djgpp_set_sigint_key(new_key : longint) : longint;cdecl; | ||||||
| {$ifdef IN_SYSTEM}forward;{$endif IN_SYSTEM} | {$ifdef IN_SYSTEM}forward;{$endif IN_SYSTEM} | ||||||
| {$ifndef CREATE_C_FUNCTIONS} | {$ifndef CREATE_C_FUNCTIONS} | ||||||
| external name '___djgpp_set_sigint_key'; | external; | ||||||
| {$endif CREATE_C_FUNCTIONS} | {$endif CREATE_C_FUNCTIONS} | ||||||
| 
 | 
 | ||||||
| function __djgpp_set_sigquit_key(new_key : longint) : longint;cdecl; | function __djgpp_set_sigquit_key(new_key : longint) : longint;cdecl; | ||||||
| {$ifdef IN_SYSTEM}forward;{$endif IN_SYSTEM} | {$ifdef IN_SYSTEM}forward;{$endif IN_SYSTEM} | ||||||
| {$ifndef CREATE_C_FUNCTIONS} | {$ifndef CREATE_C_FUNCTIONS} | ||||||
| external name '___djgpp_set_sigquit_key'; | external; | ||||||
| {$endif CREATE_C_FUNCTIONS} | {$endif CREATE_C_FUNCTIONS} | ||||||
| 
 | 
 | ||||||
| function __djgpp__traceback_exit(sig : longint) : longint;cdecl; | function __djgpp__traceback_exit(sig : longint) : longint;cdecl; | ||||||
| {$ifdef IN_SYSTEM}forward;{$endif IN_SYSTEM} | {$ifdef IN_SYSTEM}forward;{$endif IN_SYSTEM} | ||||||
| {$ifndef CREATE_C_FUNCTIONS} | {$ifndef CREATE_C_FUNCTIONS} | ||||||
| external name '__djgpp__traceback_exit'; | external; | ||||||
| {$endif CREATE_C_FUNCTIONS} | {$endif CREATE_C_FUNCTIONS} | ||||||
| 
 | 
 | ||||||
| {$ifndef IN_SYSTEM} | {$ifndef IN_SYSTEM} | ||||||
| @ -759,13 +759,13 @@ end; | |||||||
| ****************************************************************************} | ****************************************************************************} | ||||||
| 
 | 
 | ||||||
| var | var | ||||||
|   __djgpp_selector_limit: cardinal; external name '__djgpp_selector_limit'; |   ___djgpp_selector_limit: cardinal; external name '___djgpp_selector_limit'; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| {$ifdef CREATE_C_FUNCTIONS} | {$ifdef CREATE_C_FUNCTIONS} | ||||||
| 
 | 
 | ||||||
| {$ifdef IN_DPMIEXCP_UNIT} | {$ifdef IN_DPMIEXCP_UNIT} | ||||||
| procedure ___exit(c:longint);cdecl;external name '___exit'; | procedure __exit(c:longint);cdecl;external; | ||||||
| {$endif} | {$endif} | ||||||
| 
 | 
 | ||||||
| function except_to_sig(excep : longint) : longint; | function except_to_sig(excep : longint) : longint; | ||||||
| @ -920,15 +920,13 @@ begin | |||||||
|          err('Exception '); |          err('Exception '); | ||||||
|        itox(signum, 2); |        itox(signum, 2); | ||||||
|        err(' at eip='); |        err(' at eip='); | ||||||
| { |   (* For fake exceptions like SIGABRT report where `raise' was called.  *) | ||||||
|   ( * For fake exceptions like SIGABRT report where `raise' was called.  * ) |  | ||||||
|   if fake and (djgpp_exception_state_ptr^.__cs = _my_cs) |   if fake and (djgpp_exception_state_ptr^.__cs = _my_cs) | ||||||
|      and (djgpp_exception_state_ptr^.__ebp >= djgpp_exception_state_ptr^.__esp) |      and (djgpp_exception_state_ptr^.__ebp >= djgpp_exception_state_ptr^.__esp) | ||||||
|      and (djgpp_exception_state_ptr^.__ebp >= &end) |      and (djgpp_exception_state_ptr^.__ebp >= endtext) | ||||||
|      and (djgpp_exception_state_ptr^.__ebp < __djgpp_selector_limit) then |      and (djgpp_exception_state_ptr^.__ebp < ___djgpp_selector_limit) then | ||||||
|        itox(djgpp_exception_state_ptr^.__ebp + 1), 8); |        itox(djgpp_exception_state_ptr^.__ebp + 1, 8) | ||||||
|      else |      else | ||||||
| } |  | ||||||
|        itox(djgpp_exception_state_ptr^.__eip, 8); |        itox(djgpp_exception_state_ptr^.__eip, 8); | ||||||
|     end |     end | ||||||
|   else |   else | ||||||
| @ -998,7 +996,7 @@ begin | |||||||
| simple_exit: | simple_exit: | ||||||
|   if exceptions_on then |   if exceptions_on then | ||||||
|     djgpp_exception_toggle; |     djgpp_exception_toggle; | ||||||
|   ___exit(-1); |   __exit(-1); | ||||||
| end; | end; | ||||||
| {$endif CREATE_C_FUNCTIONS} | {$endif CREATE_C_FUNCTIONS} | ||||||
| 
 | 
 | ||||||
| @ -1047,7 +1045,7 @@ begin | |||||||
|               errln('FPC triple exception, exiting !!! '); |               errln('FPC triple exception, exiting !!! '); | ||||||
|             if (exceptions_on) then |             if (exceptions_on) then | ||||||
|               djgpp_exception_toggle; |               djgpp_exception_toggle; | ||||||
|             ___exit(1); |             __exit(1); | ||||||
|          end; |          end; | ||||||
|        err('FPC double exception, exiting due to signal '); |        err('FPC double exception, exiting due to signal '); | ||||||
|        itox(sig, 4); |        itox(sig, 4); | ||||||
| @ -1382,7 +1380,7 @@ begin | |||||||
|   if assigned(djgpp_exception_state_ptr) then |   if assigned(djgpp_exception_state_ptr) then | ||||||
|     { This exits, does not return.  } |     { This exits, does not return.  } | ||||||
|     do_faulting_finish_message(djgpp_exception_state_ptr=@fake_exception); |     do_faulting_finish_message(djgpp_exception_state_ptr=@fake_exception); | ||||||
|   ___exit(-1); |   __exit(-1); | ||||||
|   __djgpp__traceback_exit:=0; |   __djgpp__traceback_exit:=0; | ||||||
| end; | end; | ||||||
| 
 | 
 | ||||||
| @ -1618,7 +1616,10 @@ end; | |||||||
| {$endif IN_SYSTEM} | {$endif IN_SYSTEM} | ||||||
| { | { | ||||||
|   $Log$ |   $Log$ | ||||||
|   Revision 1.16  2004-11-29 20:39:36  peter |   Revision 1.17  2004-12-07 14:02:24  jonas | ||||||
|  |     * fix cdecl name problems (patch from Tomas) | ||||||
|  | 
 | ||||||
|  |   Revision 1.16  2004/11/29 20:39:36  peter | ||||||
|   fixed compilation |   fixed compilation | ||||||
| 
 | 
 | ||||||
|   Revision 1.15  2004/11/25 20:06:55  jonas |   Revision 1.15  2004/11/25 20:06:55  jonas | ||||||
|  | |||||||
| @ -810,7 +810,7 @@ end; | |||||||
|                          System Dependent Exit code |                          System Dependent Exit code | ||||||
| *****************************************************************************} | *****************************************************************************} | ||||||
| 
 | 
 | ||||||
| procedure ___exit(exitcode:longint);cdecl;external name '__exit'; | procedure __exit(exitcode:longint);cdecl;external; | ||||||
| 
 | 
 | ||||||
| procedure do_close(handle : longint);forward; | procedure do_close(handle : longint);forward; | ||||||
| 
 | 
 | ||||||
| @ -833,7 +833,7 @@ begin | |||||||
| {$ifndef EXCEPTIONS_IN_SYSTEM} | {$ifndef EXCEPTIONS_IN_SYSTEM} | ||||||
|   set_pm_interrupt($75,old_int75); |   set_pm_interrupt($75,old_int75); | ||||||
| {$endif EXCEPTIONS_IN_SYSTEM} | {$endif EXCEPTIONS_IN_SYSTEM} | ||||||
|   ___exit(exitcode); |   __exit(exitcode); | ||||||
| end; | end; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -897,7 +897,7 @@ end; | |||||||
|                               Heap Management |                               Heap Management | ||||||
| *****************************************************************************} | *****************************************************************************} | ||||||
| 
 | 
 | ||||||
| function ___sbrk(size:longint):longint;cdecl;external name '__sbrk'; | function __sbrk(size:longint):longint;cdecl;external; | ||||||
| 
 | 
 | ||||||
| function SysOSAlloc (size: PtrInt): pointer; assembler; | function SysOSAlloc (size: PtrInt): pointer; assembler; | ||||||
| asm | asm | ||||||
| @ -910,7 +910,7 @@ asm | |||||||
| {$endif} | {$endif} | ||||||
|         movl    size,%eax |         movl    size,%eax | ||||||
|         pushl   %eax |         pushl   %eax | ||||||
|         call    ___sbrk |         call    __sbrk | ||||||
|         addl    $4,%esp |         addl    $4,%esp | ||||||
| {$ifdef SYSTEMDEBUG} | {$ifdef SYSTEMDEBUG} | ||||||
|       .Lsbrk_fail: |       .Lsbrk_fail: | ||||||
| @ -1602,7 +1602,10 @@ Begin | |||||||
| End. | End. | ||||||
| { | { | ||||||
|   $Log$ |   $Log$ | ||||||
|   Revision 1.45  2004-12-05 14:36:37  hajny |   Revision 1.46  2004-12-07 14:02:24  jonas | ||||||
|  |     * fix cdecl name problems (patch from Tomas) | ||||||
|  | 
 | ||||||
|  |   Revision 1.45  2004/12/05 14:36:37  hajny | ||||||
|     + GetProcessID added |     + GetProcessID added | ||||||
| 
 | 
 | ||||||
|   Revision 1.44  2004/11/25 17:37:59  jonas |   Revision 1.44  2004/11/25 17:37:59  jonas | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Jonas Maebe
						Jonas Maebe