Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 251873
Collapse All | Expand All

(-)c2ada-0.26/htype.c (-20 / +9 lines)
Lines 99-126 Link Here
99
main()
99
main()
100
{
100
{
101
101
102
  /* format strings for printing *SIZE values */
103
#ifdef __APPLE__
104
#define SIZE_FLAG "%lu"
105
#elif defined linux
106
#define SIZE_FLAG "%u"
107
#elif defined sun
108
#define SIZE_FLAG "%u"
109
#else
110
#define SIZE_FLAG "%u"
111
#endif
112
113
	printf("#define BITS_PER_BYTE\t\t\t%d\n\n", NBBY);
102
	printf("#define BITS_PER_BYTE\t\t\t%d\n\n", NBBY);
114
	printf("#define SIZEOF_CHAR\t\t\t" SIZE_FLAG "\n", CHAR_SIZE);
103
	printf("#define SIZEOF_CHAR\t\t\t%u\n", (int)CHAR_SIZE);
115
	printf("#define SIZEOF_SHORT\t\t\t" SIZE_FLAG "\n", SHORT_SIZE);
104
	printf("#define SIZEOF_SHORT\t\t\t%u\n", (int)SHORT_SIZE);
116
	printf("#define SIZEOF_INT\t\t\t" SIZE_FLAG "\n", INT_SIZE);
105
	printf("#define SIZEOF_INT\t\t\t%u\n", (int)INT_SIZE);
117
	printf("#define SIZEOF_LONG\t\t\t" SIZE_FLAG "\n", LONG_SIZE);
106
	printf("#define SIZEOF_LONG\t\t\t%u\n", (int)LONG_SIZE);
118
	printf("#define SIZEOF_FLOAT\t\t\t" SIZE_FLAG "\n", FLOAT_SIZE);
107
	printf("#define SIZEOF_FLOAT\t\t\t%u\n", (int)FLOAT_SIZE);
119
	printf("#define SIZEOF_DOUBLE\t\t\t" SIZE_FLAG "\n", DOUBLE_SIZE);
108
	printf("#define SIZEOF_DOUBLE\t\t\t%u\n", (int)DOUBLE_SIZE);
120
	printf("#define SIZEOF_LONG_DOUBLE\t\t" SIZE_FLAG "\n", LONG_DOUBLE_SIZE);
109
	printf("#define SIZEOF_LONG_DOUBLE\t\t%u\n", (int)LONG_DOUBLE_SIZE);
121
	printf("#define SIZEOF_ADDRESS\t\t\t" SIZE_FLAG "\n", ADDRESS_SIZE);
110
	printf("#define SIZEOF_ADDRESS\t\t\t%u\n", (int)ADDRESS_SIZE);
122
111
123
	printf("\n#define ALIGNOF_CHAR\t\t\t" SIZE_FLAG "\n", CHAR_SIZE);
112
	printf("\n#define ALIGNOF_CHAR\t\t\t%u\n", (int)CHAR_SIZE);
124
	printf("#define ALIGNOF_SHORT\t\t\t%d\n", alignof_short());
113
	printf("#define ALIGNOF_SHORT\t\t\t%d\n", alignof_short());
125
	printf("#define ALIGNOF_INT\t\t\t%d\n", alignof_int());
114
	printf("#define ALIGNOF_INT\t\t\t%d\n", alignof_int());
126
	printf("#define ALIGNOF_LONG\t\t\t%d\n", alignof_long());
115
	printf("#define ALIGNOF_LONG\t\t\t%d\n", alignof_long());
(-)c2ada-0.26/cpp_eval.c (-4 / +4 lines)
Lines 554-560 Link Here
554
	s->nexttok = s->c;
554
	s->nexttok = s->c;
555
	s->c = getc(s);
555
	s->c = getc(s);
556
556
557
	switch (s->nexttok) {
557
	switch ((int)s->nexttok) {
558
	  case '/':
558
	  case '/':
559
	    if (s->c == '*') {
559
	    if (s->c == '*') {
560
		s->c = skip_c_comment(getc(s),s);
560
		s->c = skip_c_comment(getc(s),s);
Lines 663-669 Link Here
663
{
663
{
664
    tokval_t val;
664
    tokval_t val;
665
665
666
    switch (s->curtok) {
666
    switch ((int)s->curtok) {
667
      case tok_discrete:
667
      case tok_discrete:
668
      case tok_float:
668
      case tok_float:
669
      case tok_string:
669
      case tok_string:
Lines 748-754 Link Here
748
    l = term(s);
748
    l = term(s);
749
749
750
    for (;;) {
750
    for (;;) {
751
	switch (s->curtok) {
751
	switch ((int)s->curtok) {
752
	  case '*':
752
	  case '*':
753
	  case '/':
753
	  case '/':
754
	  case '%':
754
	  case '%':
Lines 818-824 Link Here
818
    l = f10(s);
818
    l = f10(s);
819
819
820
    for (;;) {
820
    for (;;) {
821
	switch (s->curtok) {
821
	switch ((int)s->curtok) {
822
	  case '+':
822
	  case '+':
823
	  case '-':
823
	  case '-':
824
	    op = s->curtok;
824
	    op = s->curtok;
(-)c2ada-0.26/Makefile (-3 / +3 lines)
Lines 280-292 Link Here
280
		./hostinfo $@
280
		./hostinfo $@
281
281
282
c_perf.c:	c.prf
282
c_perf.c:	c.prf
283
		$(GPERF) -t -p c.prf > $@
283
		(echo '#include <string.h>'; $(GPERF) -t -p c.prf) > $@
284
284
285
ada_perf.c:	ada.prf
285
ada_perf.c:	ada.prf
286
		$(GPERF) -k1,4,'$$' -N ada_keyword ada.prf > $@
286
		(echo '#include <string.h>'; $(GPERF) -k1,4,'$$' -N ada_keyword ada.prf) > $@
287
287
288
cpp_perf.c:	cpp.prf
288
cpp_perf.c:	cpp.prf
289
		$(GPERF) -N cpp_keyword -t -p cpp.prf > $@
289
		(echo '#include <string.h>'; $(GPERF) -N cpp_keyword -t -p cpp.prf) > $@
290
290
291
cpp_perf.o: cpp_perf.c files.h hash.h cpp.h buffer.h
291
cpp_perf.o: cpp_perf.c files.h hash.h cpp.h buffer.h
292
ada_perf.o: ada_perf.c
292
ada_perf.o: ada_perf.c
(-)c2ada-0.26/files.c (-3 / +3 lines)
Lines 166-175 Link Here
166
    return mmap(0, fsize, PROT_READ, MAP_PRIVATE, fd, 0);
166
    return mmap(0, fsize, PROT_READ, MAP_PRIVATE, fd, 0);
167
}
167
}
168
168
169
int
169
void
170
unmap_file(void * addr, size_t len)
170
unmap_file(void * addr, size_t len)
171
{
171
{
172
    return munmap(addr, (int)len);
172
    (void)munmap(addr, (int)len);
173
}
173
}
174
174
175
#else	/* This system doesn't support mmap() and munmap() */
175
#else	/* This system doesn't support mmap() and munmap() */
Lines 191-197 Link Here
191
	return addr;
191
	return addr;
192
}
192
}
193
193
194
int
194
void
195
unmap_file(addr, len)
195
unmap_file(addr, len)
196
	void *addr;
196
	void *addr;
197
	size_t len;
197
	size_t len;
(-)c2ada-0.26/files.h (-1 / +1 lines)
Lines 57-63 Link Here
57
57
58
extern size_t sizeof_file(int fd);
58
extern size_t sizeof_file(int fd);
59
extern void *map_file(int fd, size_t fsize);
59
extern void *map_file(int fd, size_t fsize);
60
extern int unmap_file(void *addr, size_t len);
60
extern void unmap_file(void *addr, size_t len);
61
extern int compare_path(char *s1, char *s2);
61
extern int compare_path(char *s1, char *s2);
62
62
63
/* convenience functions to use file_pos_t for warnings */
63
/* convenience functions to use file_pos_t for warnings */
(-)c2ada-0.26/Makefile (+1 lines)
Lines 307-312 Link Here
307
# Dependencies
307
# Dependencies
308
308
309
%.d: %.c
309
%.d: %.c
310
	test -e hostinfo.h || (touch hostinfo.h; sleep 1; touch hostinfo)
310
	$(SHELL) -ec 'gcc -MM $(CFLAGS) $< | sed "s/$*\\.o[n:]*/$@ &/g" >$@'
311
	$(SHELL) -ec 'gcc -MM $(CFLAGS) $< | sed "s/$*\\.o[n:]*/$@ &/g" >$@'
311
312
312
include $(SRCS:.c=.d)
313
include $(SRCS:.c=.d)
(-)c2ada-0.26/Makefile (-2 / +2 lines)
Lines 292-301 Link Here
292
ada_perf.o: ada_perf.c
292
ada_perf.o: ada_perf.c
293
293
294
y.tab.h:	grammar.y
294
y.tab.h:	grammar.y
295
		@echo "one reduce/reduce conflict expected"
295
		$(YACC) -d grammar.y
296
		$(YACC) -d grammar.y
296
297
297
y.tab.c:	grammar.y
298
y.tab.c:	y.tab.h
298
		echo "one reduce/reduce conflict expected"; $(YACC) grammar.y
299
299
300
#--------------------------------------------------------------------------
300
#--------------------------------------------------------------------------
301
# Configuration file for Python module set
301
# Configuration file for Python module set
(-)c2ada-0.26/grammar.y (+2 lines)
Lines 22-27 Link Here
22
extern comment_block_pt fetch_comment_block(void);
22
extern comment_block_pt fetch_comment_block(void);
23
extern void yield_typedef(boolean);
23
extern void yield_typedef(boolean);
24
extern void td(void);
24
extern void td(void);
25
extern int yylex(void);
26
extern void yyerror(char *);
25
27
26
%}
28
%}
27
29

Return to bug 251873