/[gcl]/gcl/h/mingw.h
ViewVC logotype

Diff of /gcl/h/mingw.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by mjthomas, Wed Jul 10 08:01:06 2002 UTC revision 1.10 by mjthomas, Tue Jul 30 02:40:07 2002 UTC
# Line 1  Line 1 
1  #include <stdio.h>  #include <stdio.h>
2  #include "att.h"  #include "att.h"
3    
 FILE *fopen_binary(char *name,char *mode);  
   
4  /* bfd support */  /* bfd support */
5  #ifdef HAVE_LIBBFD  #ifdef HAVE_LIBBFD
6  #  undef SPECIAL_RSYM  #  undef SPECIAL_RSYM
# Line 15  FILE *fopen_binary(char *name,char *mode Line 13  FILE *fopen_binary(char *name,char *mode
13        sprintf(command,"rsym %s %s",kcl_self,tmpfile1);        sprintf(command,"rsym %s %s",kcl_self,tmpfile1);
14  #endif  #endif
15    
16    #define SIZEOF_LONG_P 4
17    
18  #define MP386  #define MP386
19  #define WINDOWSNT  #define WINDOWSNT
# Line 49  FILE *fopen_binary(char *name,char *mode Line 48  FILE *fopen_binary(char *name,char *mode
48  #define signals_pending *signalsPendingPtr  #define signals_pending *signalsPendingPtr
49    
50  #undef DBEGIN  #undef DBEGIN
51    #undef DBEGIN_TY
52  #define DBEGIN _dbegin  #define DBEGIN _dbegin
53  extern unsigned int _stacktop, _stackbottom, _dbegin;  #define DBEGIN_TY unsigned int
54    extern DBEGIN_TY _stacktop, _stackbottom, _dbegin;
55    
56  /* define if there is no _cleanup,   do here what needs  /* define if there is no _cleanup,   do here what needs
57     to be done before calling unexec     to be done before calling unexec
# Line 100  extern unsigned int _stacktop, _stackbot Line 101  extern unsigned int _stacktop, _stackbot
101  #define SIG_SETMASK        2    /* for setting the signal mask */  #define SIG_SETMASK        2    /* for setting the signal mask */
102    
103  #define HAVE_SIGPROCMASK  #define HAVE_SIGPROCMASK
   
 #if 0  
 #ifdef __MSVCRT__  
 typedef int sigset_t ;  
 #endif  
 #endif  
   
104  #define NEED_TO_REINSTALL_SIGNALS  #define NEED_TO_REINSTALL_SIGNALS
   
105  #ifndef SIGIO  #ifndef SIGIO
106  #  define SIGIO 23  #  define SIGIO 23
107  #endif  #endif
# Line 131  typedef int sigset_t ; Line 124  typedef int sigset_t ;
124  #define SV_ONSTACK 0  #define SV_ONSTACK 0
125  #define SA_RESTART 0  #define SA_RESTART 0
126    
127  #define brk(x) printf("not doing break\n");  #define brk(x) fprintf( stderr, "not doing brk(%d)\n", x);
   
 #define USE_NT_UNEXEC  
128    
129  #ifdef USE_NT_UNEXEC  /* use the slightly older unexec */
130     /* use the slightly older unexec */  #define UNIXSAVE "unexnt.c"
131  #  define UNIXSAVE "unexnt.c"  #define RECREATE_HEAP if (initflag) { recreate_heap1(); \
 #  define RECREATE_HEAP if (initflag) { recreate_heap1(); \  
132       terminal_io->sm.sm_object1->sm.sm_fp=stdout; \       terminal_io->sm.sm_object1->sm.sm_fp=stdout; \
133       terminal_io->sm.sm_object0->sm.sm_fp=stdin; }       terminal_io->sm.sm_object0->sm.sm_fp=stdin; }
 #else  
 #  define UNIXSAVE "unexw32.c"  
 #  define RECREATE_HEAP  init_heap();  
 #endif  
   
 #if defined(IN_SFASL) || defined(IN_RSYM)  
 #  undef fopen  
 FILE *fopen_binary(char *name,char *mode)  
 {  
   char buf[10];  
   char *p=buf;  
   while (*mode)  
     *p++=*mode++;  
   *p++='b';  
   *p++=0;  
   return fopen(name,buf);  
 }  
 #endif  
     
 #define fopen fopen_binary  
134    
135  #define HAVE_AOUT "wincoff.h"  #define HAVE_AOUT "wincoff.h"
136  /* we dont need to worry about zeroing fp->_base , to prevent  */  /* we dont need to worry about zeroing fp->_base , to prevent  */
   
137   /* must use seek to go to beginning of string table */   /* must use seek to go to beginning of string table */
138  /* #define MUST_SEEK_TO_STROFF */  /* #define MUST_SEEK_TO_STROFF */
139  /* #define N_STROFF(hdr)   ((&hdr)->f_symptr+((&hdr)->f_nsyms)*SYMESZ) */  /* #define N_STROFF(hdr)   ((&hdr)->f_symptr+((&hdr)->f_nsyms)*SYMESZ) */
# Line 173  FILE *fopen_binary(char *name,char *mode Line 142  FILE *fopen_binary(char *name,char *mode
142    
143  #define SEEK_TO_END_OFILE(fp) do { struct filehdr fileheader; int i; \  #define SEEK_TO_END_OFILE(fp) do { struct filehdr fileheader; int i; \
144          fseek(fp,0,0) ; \          fseek(fp,0,0) ; \
145          fread(&fileheader, sizeof(fileheader), 1, fp); \          fread(&fileheader, sizeof(fileheader), 1, fp); \
146          fseek(fp,    fileheader.f_symptr+fileheader.f_nsyms*SYMESZ, 0); \          fseek(fp,    fileheader.f_symptr+fileheader.f_nsyms*SYMESZ, 0); \
147          fread(&i, sizeof(i), 1, fp); \          fread(&i, sizeof(i), 1, fp); \
148          fseek(fp, i - sizeof(i), 1); \          fseek(fp, i - sizeof(i), 1); \
149          while ((i = getc(fp)) == 0) \          while ((i = getc(fp)) == 0) \
150                  ; \                  ; \
151          ungetc(i, fp); \          ungetc(i, fp); \
152      } while (0)      } while (0)
153                                    
154  #define FCLOSE_SETBUF_OK  #define FCLOSE_SETBUF_OK
# Line 222  FILE *fopen_binary(char *name,char *mode Line 191  FILE *fopen_binary(char *name,char *mode
191          error("Someone allocated my memory!");} \          error("Someone allocated my memory!");} \
192          if (core_end != (sbrk(PAGESIZE*(n - m))))          if (core_end != (sbrk(PAGESIZE*(n - m))))
193    
194  #define USE_INTERNAL_REAL_TIME_FOR_RUNTIME      #define USE_INTERNAL_REAL_TIME_FOR_RUNTIME
195  #define SHARP_EQ_CONTEXT_SIZE 1024  #define SHARP_EQ_CONTEXT_SIZE 1024
196    
197  /* Begin for cmpinclude */  /* Begin for cmpinclude */

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26