home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / c / djgpp / diffs / flex.dif < prev    next >
Encoding:
Text File  |  1991-03-24  |  2.9 KB  |  125 lines

  1. diff +context=2 oflex-2.36/flexdef.h flex-2.36/flexdef.h
  2. *** oflex-2.36/flexdef.h    Sun Mar 24 14:26:48 1991
  3. --- flex-2.36/flexdef.h    Thu Mar  7 00:11:56 1991
  4. ***************
  5. *** 70,74 ****
  6.   char *sprintf(); /* keep lint happy */
  7.   #endif
  8. ! #ifdef SCO_UNIX
  9.   void *memset();
  10.   #else
  11. --- 70,74 ----
  12.   char *sprintf(); /* keep lint happy */
  13.   #endif
  14. ! #if defined(SCO_UNIX) || defined(GNUDOS)
  15.   void *memset();
  16.   #else
  17. ***************
  18. *** 126,129 ****
  19. --- 126,133 ----
  20.   #endif
  21.   
  22. + #ifdef GNUDOS
  23. + #define SHORT_FILE_NAMES
  24. + #endif
  25.   #define true 1
  26.   #define false 0
  27. ***************
  28. *** 660,664 ****
  29. --- 664,673 ----
  30.    * be YYSTYPE, but we can't easily get our hands on it.
  31.    */
  32. + /* GNUDOS: bison uses unsigned long */
  33. + #ifndef GNUDOS
  34.   extern int yylval;
  35. + #else
  36. + extern unsigned long yylval;
  37. + #endif
  38.   
  39.   
  40. ***************
  41. *** 867,871 ****
  42. --- 876,886 ----
  43.   /* The Unix kernel calls used here */
  44.   
  45. + #ifndef __GNUC__
  46.   extern int read PROTO((int, char*, int));
  47.   extern int unlink PROTO((char*));
  48.   extern int write PROTO((int, char*, int));
  49. + #else
  50. + extern int read PROTO((int, void*, unsigned));
  51. + extern int unlink PROTO((const char*));
  52. + extern int write PROTO((int, const void*, unsigned));
  53. + #endif
  54. diff +context=2 oflex-2.36/main.c flex-2.36/main.c
  55. *** oflex-2.36/main.c    Sun Mar 24 14:26:50 1991
  56. --- flex-2.36/main.c    Thu Mar  7 00:11:56 1991
  57. ***************
  58. *** 554,559 ****
  59.       static char skeleton_name_storage[400];
  60.   
  61. !     skelname = skeleton_name_storage;
  62. !     (void) strcpy( skelname, DEFAULT_SKELETON_FILE );
  63.       }
  64.   
  65. --- 554,570 ----
  66.       static char skeleton_name_storage[400];
  67.   
  68. !     /* GNUDOS: use GCCLIB environment variable */
  69. ! #ifdef GNUDOS
  70. !     extern char *getenv();
  71. !     skelname = getenv("FLEX_SKELETON");
  72. !     if (!skelname) {
  73. ! #endif
  74. !       skelname = skeleton_name_storage;
  75. !       (void) strcpy( skelname, DEFAULT_SKELETON_FILE );
  76. ! #ifdef GNUDOS
  77. !       }
  78. ! #endif
  79.       }
  80.   
  81. diff +context=2 oflex-2.36/makefile flex-2.36/makefile
  82. *** oflex-2.36/makefile    Sun Mar 24 14:26:50 1991
  83. --- flex-2.36/makefile    Sun Mar 24 14:34:34 1991
  84. ***************
  85. *** 33,37 ****
  86. --- 33,43 ----
  87.   # the first time around use "make first_flex"
  88.   
  89. + # GNUDOS: set up for gcc
  90. + CC = gcc -DGNUDOS
  91. + MAKE = make
  92. + .c.o:
  93. +     $(CC) $(CFLAGS) -c $<
  94.   
  95.   # Installation targeting.  Files will be installed under the tree rooted
  96.   # at DESTDIR.  User commands will be installed in BINDIR, library files
  97. ***************
  98. *** 106,115 ****
  99.   first_flex:
  100.       cp initscan.c scan.c
  101. !     $(MAKE) $(MFLAGS) flex
  102.   
  103.   parse.h parse.c : parse.y
  104. !     $(YACC) -d parse.y
  105. !     @mv y.tab.c parse.c
  106. !     @mv y.tab.h parse.h
  107.   
  108.   scan.c : scan.l
  109. --- 112,122 ----
  110.   first_flex:
  111.       cp initscan.c scan.c
  112. !     make $(MFLAGS) flex
  113.   
  114. + # GNUDOS: use bison
  115.   parse.h parse.c : parse.y
  116. !     bison -d parse.y
  117. !     @mv parse_tab.c parse.c
  118. !     @mv parse_tab.h parse.h
  119.   
  120.   scan.c : scan.l
  121.