Changeset 439 for trunk/src/gcc
- Timestamp:
- Jul 25, 2003, 3:37:21 PM (22 years ago)
- Location:
- trunk/src/gcc/gcc/config/i386
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gcc/gcc/config/i386/emx-dllinit.c
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r438 r439 2 2 DLL which uses exceptions). It should call __ehInit() as any other dynamic 3 3 library which uses exceptions, otherwise the C++ programs linked to it will 4 fail to catch exceptions. */ 4 fail to catch exceptions. 5 6 -= This is duplicated in libgcc and this copy must be removed when =- 7 -= we've done a new release! =- 8 9 */ 5 10 6 11 extern int _CRT_init (void); 7 12 extern void __ctordtorInit (void); 8 13 extern void __ctordtorTerm (void); 9 extern void __ehInit (void); 10 extern void __ehTerm (void); 14 extern void __ehInitDLL (void); 15 #pragma weak __ehInitDLL 16 extern void __ehTermDLL (void); 17 #pragma weak __ehTermDLL 11 18 12 19 unsigned long _System _DLL_InitTerm (unsigned long mod_handle, unsigned long flag) … … 16 23 case 0: 17 24 if (_CRT_init () != 0) 18 return 0; 25 break; 26 if (__ehInitDLL) 27 __ehInitDLL (); 19 28 __ctordtorInit (); 20 __ehInit ();21 29 return 1; 22 30 case 1: 23 __ehTerm ();24 31 __ctordtorTerm (); 32 if (__ehTermDLL) 33 __ehTermDLL (); 25 34 return 1; 26 default:27 return 0;28 35 } 36 return 0; 29 37 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/gcc/gcc/config/i386/emx-eh.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r438 r439 6 6 extern void __register_frame_table (void *begin); 7 7 extern void __deregister_frame (void *begin); 8 9 /** Exception handler stuff init indicator. 0 means not inited, 1 means inited. */ 10 static int inited; 8 11 extern void __ehInit (void); 9 12 extern void __ehTerm (void); 13 extern void __ehTermDLL (void); 10 14 11 void __ehTerm (void) 15 /** 16 * Inits exception handler stuff. 17 * Intended external caller is _DLL_InitTerm. 18 */ 19 void __ehInitDLL (void) 12 20 { 13 static int done; 14 15 if (!done) 21 if (!inited) 16 22 { 17 23 int *ptr = &__eh_frame__; 18 done = 1; 24 inited = 1; 25 __register_frame_table (&ptr [*ptr == -2 ? 1 : 2]); 26 } 27 } 28 29 /** 30 * Terminates exception handler stuff. 31 * Intended external caller is _DLL_InitTerm. 32 */ 33 void __ehTermDLL (void) 34 { 35 if (inited) 36 { 37 int *ptr = &__eh_frame__; 38 inited = 0; 19 39 __deregister_frame (&ptr [*ptr == -2 ? 1 : 2]); 20 40 } 21 41 } 22 42 43 44 /** 45 * atexit() procedure used pto terminate exception stuff in programs. 46 * Registered by __ehInit. 47 */ 48 static void __ehTerm (void) 49 { 50 __ehTermDLL(); 51 } 52 53 /** 54 * Init exception handler stuff for a program. 55 * Intended external caller is GCC generated main() code. 56 */ 23 57 void __ehInit (void) 24 58 { 25 static int done; 26 27 if (!done) 59 if (!inited) 28 60 { 29 int *ptr = &__eh_frame__;30 done = 1;31 __register_frame_table (&ptr [*ptr == -2 ? 1 : 2]);32 61 atexit (__ehTerm); 62 __ehInitDLL(); 33 63 } 34 64 } 65 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.