Advertisement
bejiitas_wrath

Bourne Shell compilation attempt.

Dec 3rd, 2019
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 9.68 KB | None | 0 0
  1. root@kali:~# gcc sh.c
  2. In file included from defs.h:75,
  3.                  from sh.c:10:
  4. mode.h:46:15: error: array type has incomplete element type ‘struct sysnod’
  5.    46 | STRUCT sysnod SYSTAB[];
  6.       |               ^~~~~~
  7. mode.h:55:7: warning: unnamed struct/union that defines no instances
  8.    55 | union { int _cheat;};
  9.       |       ^
  10. mode.h:76:8: error: expected ‘{’ before ‘void’
  11.    76 | struct void {INT vvvvvvvv;};
  12.       |        ^~~~
  13. mode.h:76:8: error: two or more data types in declaration specifiers
  14. In file included from sh.c:10:
  15. defs.h:80:15: warning: conflicting types for built-in function ‘malloc’; expected ‘void *(long unsigned int)[-Wbuiltin-declaration-mismatch]
  16.    80 | #define alloc malloc
  17.       |               ^~~~~~
  18. defs.h:81:10: note: in expansion of macro ‘alloc’
  19.    81 | ADDRESS  alloc();
  20.       |          ^~~~~
  21. defs.h:77:1: note: ‘malloc’ is declared in header ‘<stdlib.h>
  22.    76 | #include "name.h"
  23.   +++ |+#include <stdlib.h>
  24.    77 |
  25. In file included from sh.c:10:
  26. defs.h:150:9: warning: type defaults to ‘int’ in declaration of ‘reserved’ [-Wimplicit-int]
  27.   150 | SYSTAB  reserved;
  28.       |         ^~~~~~~~
  29. sh.c: In function ‘expand’:
  30. sh.c:30:5: warning: type of ‘rflg’ defaults to ‘int’ [-Wimplicit-int]
  31.    30 | INT expand(as,rflg)
  32.       |     ^~~~~~
  33. sh.c:68:17: warning: implicit declaration of function ‘open’; did you mean ‘opendir’? [-Wimplicit-function-declaration]
  34.    68 |      ANDF (dirf=open(s,0))>0
  35.       |                 ^~~~
  36.       |                 opendir
  37. sh.c:80:9: warning: implicit declaration of functionread’; did you mean ‘readpr’? [-Wimplicit-function-declaration]
  38.    80 |   WHILE read(dirf, &entry, 16) == 16 ANDF (trapnote&SIGSET) == 0
  39.       |         ^~~~
  40.       |         readpr
  41. sh.c:85:7: warning: implicit declaration of function ‘gmatch’ [-Wimplicit-function-declaration]
  42.    85 |    IF gmatch(entry.d_name, cs)
  43.       |       ^~~~~~
  44. sh.c:89:3: warning: implicit declaration of function ‘close’; did you mean ‘closedir’? [-Wimplicit-function-declaration]
  45.    89 |   close(dirf);
  46.       |   ^~~~~
  47.       |   closedir
  48. sh.c: At top level:
  49. sh.c:114:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  50.   114 | gmatch(s, p)
  51.       | ^~~~~~
  52. sh.c:159:12: error: static declaration of ‘addg’ follows non-static declaration
  53.   159 | LOCAL VOID addg(as1,as2,as3)
  54.       |            ^~~~
  55. sh.c:27:11: note: previous declaration of ‘addg’ was here
  56.    27 | PROC VOID addg();
  57.       |           ^~~~
  58. sh.c: In function ‘addg’:
  59. sh.c:181:2: warning: implicit declaration of function ‘makearg’ [-Wimplicit-function-declaration]
  60.   181 |  makearg(endstak(s2));
  61.       |  ^~~~~~~
  62. sh.c: At top level:
  63. sh.c:184:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
  64.   184 | makearg(args)
  65.       | ^~~~~~~
  66. sh.c: In function ‘makearg’:
  67. sh.c:187:6: error: request for member ‘argnxt’ in something not a structure or union
  68.   187 |  args->argnxt=gchain;
  69.       |      ^~
  70. sh.c:188:8: warning: assignment to ‘ARGPTR’ {aka ‘struct argnod *} from incompatible pointer type ‘STRING’ {aka ‘char *} [-Wincompatible-pointer-types]
  71.   188 |  gchain=args;
  72.       |        ^
  73. In file included from sh.c:10:
  74. sh.c: At top level:
  75. defs.h:139:6: warning: array ‘atline’ assumed to have one element
  76.   139 | MSG  atline;
  77.       |      ^~~~~~
  78. defs.h:140:6: warning: array ‘readmsg’ assumed to have one element
  79.   140 | MSG  readmsg;
  80.       |      ^~~~~~~
  81. defs.h:141:6: warning: array ‘colon’ assumed to have one element
  82.   141 | MSG  colon;
  83.       |      ^~~~~
  84. defs.h:142:6: warning: array ‘minus’ assumed to have one element
  85.   142 | MSG  minus;
  86.       |      ^~~~~
  87. defs.h:143:6: warning: array ‘nullstr’ assumed to have one element
  88.   143 | MSG  nullstr;
  89.       |      ^~~~~~~
  90. defs.h:144:6: warning: array ‘sptbnl’ assumed to have one element
  91.   144 | MSG  sptbnl;
  92.       |      ^~~~~~
  93. defs.h:145:6: warning: array ‘unexpected’ assumed to have one element
  94.   145 | MSG  unexpected;
  95.       |      ^~~~~~~~~~
  96. defs.h:146:6: warning: array ‘endoffile’ assumed to have one element
  97.   146 | MSG  endoffile;
  98.       |      ^~~~~~~~~
  99. defs.h:147:6: warning: array ‘synmsg’ assumed to have one element
  100.   147 | MSG  synmsg;
  101.       |      ^~~~~~
  102. defs.h:158:6: warning: array ‘stdprompt’ assumed to have one element
  103.   158 | MSG  stdprompt;
  104.       |      ^~~~~~~~~
  105. defs.h:159:6: warning: array ‘supprompt’ assumed to have one element
  106.   159 | MSG  supprompt;
  107.       |      ^~~~~~~~~
  108. defs.h:160:6: warning: array ‘profile’ assumed to have one element
  109.   160 | MSG  profile;
  110.       |      ^~~~~~~
  111. defs.h:172:6: warning: array ‘flagadr’ assumed to have one element
  112.   172 | MSG  flagadr;
  113.       |      ^~~~~~~
  114. defs.h:179:6: warning: array ‘defpath’ assumed to have one element
  115.   179 | MSG  defpath;
  116.       |      ^~~~~~~
  117. defs.h:182:6: warning: array ‘mailname’ assumed to have one element
  118.   182 | MSG  mailname;
  119.       |      ^~~~~~~~
  120. defs.h:183:6: warning: array ‘homename’ assumed to have one element
  121.   183 | MSG  homename;
  122.       |      ^~~~~~~~
  123. defs.h:184:6: warning: array ‘pathname’ assumed to have one element
  124.   184 | MSG  pathname;
  125.       |      ^~~~~~~~
  126. defs.h:185:6: warning: array ‘fngname’ assumed to have one element
  127.   185 | MSG  fngname;
  128.       |      ^~~~~~~
  129. defs.h:186:6: warning: array ‘ifsname’ assumed to have one element
  130.   186 | MSG  ifsname;
  131.       |      ^~~~~~~
  132. defs.h:187:6: warning: array ‘ps1name’ assumed to have one element
  133.   187 | MSG  ps1name;
  134.       |      ^~~~~~~
  135. defs.h:188:6: warning: array ‘ps2name’ assumed to have one element
  136.   188 | MSG  ps2name;
  137.       |      ^~~~~~~
  138. defs.h:191:7: warning: array ‘tmpout’ assumed to have one element
  139.   191 | CHAR  tmpout[];
  140.       |       ^~~~~~
  141. defs.h:200:6: warning: array ‘devnull’ assumed to have one element
  142.   200 | MSG  devnull;
  143.       |      ^~~~~~~
  144. In file included from sh.c:10:
  145. defs.h:242:9: warning: array ‘trapcom’ assumed to have one element
  146.   242 | STRING  trapcom[];
  147.       |         ^~~~~~~
  148. defs.h:243:7: warning: array ‘trapflg’ assumed to have one element
  149.   243 | BOOL  trapflg[];
  150.       |       ^~~~~~~
  151. defs.h:247:7: warning: array ‘numbuf’ assumed to have one element
  152.   247 | CHAR  numbuf[];
  153.       |       ^~~~~~
  154. defs.h:248:6: warning: array ‘export’ assumed to have one element
  155.   248 | MSG  export;
  156.       |      ^~~~~~
  157. defs.h:249:6: warning: array ‘readonly’ assumed to have one element
  158.   249 | MSG  readonly;
  159.       |      ^~~~~~~~
  160. defs.h:258:6: warning: array ‘mailmsg’ assumed to have one element
  161.   258 | MSG  mailmsg;
  162.       |      ^~~~~~~
  163. defs.h:259:6: warning: array ‘coredump’ assumed to have one element
  164.   259 | MSG  coredump;
  165.       |      ^~~~~~~~
  166. defs.h:260:6: warning: array ‘badopt’ assumed to have one element
  167.   260 | MSG  badopt;
  168.       |      ^~~~~~
  169. defs.h:261:6: warning: array ‘badparam’ assumed to have one element
  170.   261 | MSG  badparam;
  171.       |      ^~~~~~~~
  172. defs.h:262:6: warning: array ‘badsub’ assumed to have one element
  173.   262 | MSG  badsub;
  174.       |      ^~~~~~
  175. defs.h:263:6: warning: array ‘nospace’ assumed to have one element
  176.   263 | MSG  nospace;
  177.       |      ^~~~~~~
  178. defs.h:281:6: warning: array ‘notfound’ assumed to have one element
  179.   281 | MSG  notfound;
  180.       |      ^~~~~~~~
  181. defs.h:265:6: warning: array ‘badtrap’ assumed to have one element
  182.   265 | MSG  badtrap;
  183.       |      ^~~~~~~
  184. defs.h:266:6: warning: array ‘baddir’ assumed to have one element
  185.   266 | MSG  baddir;
  186.       |      ^~~~~~
  187. defs.h:267:6: warning: array ‘badshift’ assumed to have one element
  188.   267 | MSG  badshift;
  189.       |      ^~~~~~~~
  190. defs.h:268:6: warning: array ‘illegal’ assumed to have one element
  191.   268 | MSG  illegal;
  192.       |      ^~~~~~~
  193. defs.h:269:6: warning: array ‘restricted’ assumed to have one element
  194.   269 | MSG  restricted;
  195.       |      ^~~~~~~~~~
  196. defs.h:270:6: warning: array ‘execpmsg’ assumed to have one element
  197.   270 | MSG  execpmsg;
  198.       |      ^~~~~~~~
  199. defs.h:271:6: warning: array ‘notid’ assumed to have one element
  200.   271 | MSG  notid;
  201.       |      ^~~~~
  202. defs.h:272:6: warning: array ‘wtfailed’ assumed to have one element
  203.   272 | MSG  wtfailed;
  204.       |      ^~~~~~~~
  205. defs.h:273:6: warning: array ‘badcreate’ assumed to have one element
  206.   273 | MSG  badcreate;
  207.       |      ^~~~~~~~~
  208. defs.h:274:6: warning: array ‘piperr’ assumed to have one element
  209.   274 | MSG  piperr;
  210.       |      ^~~~~~
  211. defs.h:275:6: warning: array ‘badopen’ assumed to have one element
  212.   275 | MSG  badopen;
  213.       |      ^~~~~~~
  214. defs.h:276:6: warning: array ‘badnum’ assumed to have one element
  215.   276 | MSG  badnum;
  216.       |      ^~~~~~
  217. defs.h:277:6: warning: array ‘arglist’ assumed to have one element
  218.   277 | MSG  arglist;
  219.       |      ^~~~~~~
  220. defs.h:278:6: warning: array ‘txtbsy’ assumed to have one element
  221.   278 | MSG  txtbsy;
  222.       |      ^~~~~~
  223. defs.h:279:6: warning: array ‘toobig’ assumed to have one element
  224.   279 | MSG  toobig;
  225.       |      ^~~~~~
  226. defs.h:280:6: warning: array ‘badexec’ assumed to have one element
  227.   280 | MSG  badexec;
  228.       |      ^~~~~~~
  229. defs.h:282:6: warning: array ‘badfile’ assumed to have one element
  230.   282 | MSG  badfile;
  231.       |      ^~~~~~~
  232. defs.h:284:9: warning: array ‘end’ assumed to have one element
  233.   284 | address end[];
  234.       |         ^~~
  235. In file included from defs.h:286,
  236.                  from sh.c:10:
  237. ctype.h:69:6: warning: array ‘_ctype1’ assumed to have one element
  238.    69 | char _ctype1[];
  239.       |      ^~~~~~~
  240. ctype.h:80:6: warning: array ‘_ctype2’ assumed to have one element
  241.    80 | char _ctype2[];
  242.       |      ^~~~~~~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement