Commits

Ryan Schmidt authored 2a14207d782
cssc: add upstream patches to fix build failure on OS X <= 10.6 (https://trac.macports.org/ticket/45258); become maintainer

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@126199 d073be05-634f-4543-b044-5fe20cf6d1d6
No tags

devel/cssc/files/patch-config.h.diff

Added
1 +http://lists.gnu.org/archive/html/bug-cssc/2014-09/msg00003.html
2 +http://git.savannah.gnu.org/cgit/cssc.git/commit/?id=9737f41b5d2a49e61061e9f896b5a9ae19e3a3ac
3 +--- auxfiles/Makefile.in 2014-07-11 07:32:58.000000000 -0500
4 ++++ auxfiles/Makefile.in 2014-10-05 02:24:06.000000000 -0500
5 +@@ -799,7 +799,7 @@
6 + top_build_prefix = @top_build_prefix@
7 + top_builddir = @top_builddir@
8 + top_srcdir = @top_srcdir@
9 +-EXTRA_DIST = check-testfiles.sh
10 ++EXTRA_DIST = check-testfiles.sh firstinclude.sed
11 + all: all-am
12 +
13 + .SUFFIXES:
14 +--- dev/null
15 ++++ auxfiles/firstinclude.sed
16 +@@ -0,0 +1,19 @@
17 ++/^ *# *include ["<].*[">]/ {
18 ++s/^ *# *include ["<]\(.*\)[">]/\1/
19 ++t YESREALLY
20 ++i\
21 ++Internal error - regexes are inconsistent
22 ++q
23 ++: YESREALLY
24 ++#s/^\(config\|cssc\).h$//
25 ++s/^config\.h$//
26 ++t OK
27 ++=
28 ++i\
29 ++config.h should be #included first
30 ++: OK
31 ++# q with an exit code is a GNU extension, don't use it.
32 ++q
33 ++}
34 ++
35 ++
36 +--- src/Makefile.in 2014-07-11 07:33:00.000000000 -0500
37 ++++ src/Makefile.in 2014-10-05 02:24:06.000000000 -0500
38 +@@ -1615,6 +1615,20 @@
39 + sccsdiff: sccsdiff.sh
40 + sed -e 's:__csscutildir__:$(csscutildir):g' < sccsdiff.sh > $@ && chmod a+x $@ || { rm -f $@; false; }
41 +
42 ++check-include-order:
43 ++ rv=0; \
44 ++ for f in $(srcdir)/*.cc; \
45 ++ do \
46 ++ msg="`sed -n -f $(top_srcdir)/auxfiles/firstinclude.sed < $$f`"; \
47 ++ if test -n "$${msg}"; \
48 ++ then \
49 ++ set -- $${msg} ; line=$${1} ; shift; errmsg="$${*}"; \
50 ++ echo "$${f}:$${line}:$${errmsg}" >&2; \
51 ++ rv=1; \
52 ++ fi \
53 ++ done; \
54 ++ exit $${rv}
55 ++
56 + testsplit$(EXEEXT): fnsplit.cc mystring.$(OBJEXT) quit.$(OBJEXT)
57 + $(CXXCOMPILE) -DTEST_FNSPLIT -o testsplit$(EXEEXT) \
58 + $(srcdir)/fnsplit.cc mystring.$(OBJEXT) quit.$(OBJEXT)
59 +--- src/admin.cc
60 ++++ src/admin.cc
61 +@@ -23,6 +23,8 @@
62 + * Administer and create SCCS files.
63 + *
64 + */
65 ++#include <config.h>
66 ++
67 + #include <errno.h>
68 +
69 + #include "cssc.h"
70 +--- src/bodyio.cc
71 ++++ src/bodyio.cc
72 +@@ -23,6 +23,12 @@
73 + *
74 + */
75 +
76 ++#include <config.h>
77 ++
78 ++#include <cstdio>
79 ++#include <cstring>
80 ++
81 ++#include "cssc.h"
82 + #include "bodyio.h"
83 + #include "quit.h"
84 + #include "cssc-assert.h"
85 +@@ -32,9 +38,6 @@
86 + #include "ioerr.h"
87 + #include "file.h"
88 +
89 +-#include <cstdio>
90 +-#include <cstring>
91 +-
92 + /* Check if we have exceeded the maximum line length.
93 + */
94 + static bool check_line_len(const char *iname,
95 +--- src/cap.cc
96 ++++ src/cap.cc
97 +@@ -23,6 +23,8 @@
98 + * Utilities for limiting output to the constraints of the file format.
99 + */
100 +
101 ++#include <config.h>
102 ++
103 + #include "cssc.h"
104 +
105 +
106 +--- src/cdc.cc
107 ++++ src/cdc.cc
108 +@@ -23,6 +23,8 @@
109 + *
110 + */
111 +
112 ++#include <config.h>
113 ++
114 + #include "cssc.h"
115 + #include "my-getopt.h"
116 + #include "fileiter.h"
117 +--- src/delta-iterator.cc
118 ++++ src/delta-iterator.cc
119 +@@ -25,6 +25,9 @@
120 + *
121 + */
122 +
123 ++#include <config.h>
124 ++
125 ++#include "cssc.h"
126 + #include "delta-iterator.h"
127 + #include "delta-table.h"
128 + #include "cssc-assert.h"
129 +--- src/delta-table.cc
130 ++++ src/delta-table.cc
131 +@@ -22,6 +22,9 @@
132 + *
133 + */
134 +
135 ++#include <config.h>
136 ++
137 ++#include "cssc.h"
138 + #include "delta-table.h"
139 + #include "delta-iterator.h"
140 +
141 +--- src/delta.cc
142 ++++ src/delta.cc
143 +@@ -24,6 +24,10 @@
144 + *
145 + */
146 +
147 ++
148 ++#include <config.h>
149 ++
150 ++#include "cssc.h"
151 + #include "delta.h"
152 + #include "cleanup.h"
153 + #include "my-getopt.h"
154 +--- src/dtbl-prepend.cc
155 ++++ src/dtbl-prepend.cc
156 +@@ -24,6 +24,9 @@
157 + *
158 + */
159 +
160 ++#include <config.h>
161 ++
162 ++#include "cssc.h"
163 + #include "delta-table.h"
164 +
165 +
166 +--- src/encoding.cc
167 ++++ src/encoding.cc
168 +@@ -25,6 +25,9 @@
169 + * Compile on its own, defining TEST_CODE, to compile a test program.
170 + */
171 +
172 ++#include <config.h>
173 ++
174 ++#include "cssc.h"
175 + #include "bodyio.h"
176 + #include "cssc-assert.h"
177 +
178 +--- src/environment.cc
179 ++++ src/environment.cc
180 +@@ -22,15 +22,15 @@
181 + * sections "Environment" and "Interoperability" in the CSSC manual.
182 + *
183 + */
184 ++#include "config.h"
185 ++
186 ++#include <cerrno>
187 ++#include <cstdio>
188 + #include <cstdlib>
189 + #include <cstring>
190 +-#include <cstdio>
191 +-#include <cerrno>
192 +-
193 +-#include "cssc.h"
194 +-
195 + #include <limits.h>
196 +
197 ++#include "cssc.h"
198 +
199 + bool binary_file_creation_allowed (void)
200 + {
201 +--- src/fatalsig.cc
202 ++++ src/fatalsig.cc
203 +@@ -22,14 +22,15 @@
204 + * Handle fatal signals...
205 + *
206 + */
207 ++#include "config.h"
208 ++
209 + #include <cstdlib>
210 ++#include <signal.h> /* TODO: consider using sigaction(). */
211 +
212 ++#include "cssc-assert.h"
213 + #include "cssc.h"
214 +-#include "version.h"
215 + #include "quit.h"
216 +-
217 +-#include <signal.h> /* TODO: consider using sigaction(). */
218 +-#include "cssc-assert.h"
219 ++#include "version.h"
220 +
221 +
222 + /* The expansion of RETSIGTYPE is automatically decided by the configure
223 +--- src/fdclosed.cc
224 ++++ src/fdclosed.cc
225 +@@ -31,13 +31,14 @@
226 + * the file pointer on our file too).
227 + */
228 +
229 +-#include "cssc.h"
230 +-#include "sysdep.h"
231 +-#include "defaults.h" // CONFIG_NULL_FILENAME
232 ++#include <config.h>
233 +
234 + #include <unistd.h>
235 + #include <stdio.h> /* perror() */
236 +
237 ++#include "cssc.h"
238 ++#include "sysdep.h"
239 ++#include "defaults.h" // CONFIG_NULL_FILENAME
240 +
241 + class SafeFdCheck
242 + {
243 +--- src/file.cc
244 ++++ src/file.cc
245 +@@ -23,19 +23,22 @@
246 + * System dependent routines for accessing files.
247 + *
248 + */
249 ++#include "config.h"
250 ++
251 + #include <errno.h>
252 ++#include <sys/types.h>
253 ++#include <sys/stat.h>
254 ++#include <unistd.h>
255 ++#include <stdio.h>
256 ++#include <stdlib.h>
257 +
258 +-#include "cssc.h"
259 ++#include "cssc.h" /* for CONFIG_CAN_HARD_LINK_AN_OPEN_FILE */
260 + #include "cssc-assert.h"
261 + #include "sysdep.h"
262 + #include "file.h"
263 + #include "quit.h"
264 + #include "ioerr.h"
265 + #include "defaults.h"
266 +-
267 +-#include <unistd.h>
268 +-#include <sys/stat.h>
269 +-#include <stdio.h>
270 + #include "dirent-safer.h"
271 +
272 + /* Redirects stdout to a "null" file (eg. /dev/null). */
273 +@@ -152,14 +155,14 @@
274 +
275 +
276 +
277 ++static int unprivileged = 0;
278 ++
279 + #ifdef CONFIG_UIDS
280 +
281 + /* A flag to indicate whether or not the programme is an privileged
282 + (effective UID != real UID) or unprivileged (effective UID == real
283 + UID). */
284 +
285 +-static int unprivileged = 0;
286 +-
287 + #ifdef SAVED_IDS_OK
288 +
289 + static uid_t old_euid;
290 +--- src/file.h
291 ++++ src/file.h
292 +@@ -33,6 +33,7 @@
293 + #include <sys/types.h>
294 +
295 + #include "filelock.h"
296 ++#include "mystring.h"
297 +
298 + enum create_mode {
299 + CREATE_EXCLUSIVE = 001,
300 +--- src/filelock.h
301 ++++ src/filelock.h
302 +@@ -28,6 +28,7 @@
303 + #define CSSC__FILELOCK_H__
304 +
305 + #include "cleanup.h"
306 ++#include "mystring.h"
307 +
308 + class file_lock : private cleanup {
309 + int locked;
310 +--- src/fnsplit.cc
311 ++++ src/fnsplit.cc
312 +@@ -20,6 +20,8 @@
313 + * Functions for canonifying filenames.
314 + */
315 +
316 ++#include <config.h>
317 ++
318 + #include "cssc.h"
319 + #include "mystring.h"
320 + #include "file.h" // declaration of split_filename.
321 +--- src/get.cc
322 ++++ src/get.cc
323 +@@ -23,6 +23,8 @@
324 + * Extract a requested delta from a SCCS file.
325 + *
326 + */
327 ++#include "config.h"
328 ++
329 + #include <errno.h>
330 +
331 + #include "cssc.h"
332 +--- src/l-split.cc
333 ++++ src/l-split.cc
334 +@@ -24,6 +24,8 @@
335 + *
336 + */
337 +
338 ++#include <config.h>
339 ++
340 + #include "cssc.h"
341 + #include "mylist.h"
342 + #include "sccsfile.h" // declares these functions.
343 +--- src/linebuf.cc
344 ++++ src/linebuf.cc
345 +@@ -23,6 +23,8 @@
346 + * Members of the class cssc_linebuf.
347 + *
348 + */
349 ++#include "config.h"
350 ++
351 + #include <cstdio>
352 + #include <cstring>
353 + #include <climits>
354 +--- src/pf-add.cc
355 ++++ src/pf-add.cc
356 +@@ -23,6 +23,8 @@
357 + *
358 + */
359 +
360 ++#include <config.h>
361 ++
362 + #include "cssc.h"
363 + #include "pfile.h"
364 + #include "except.h"
365 +--- src/pf-del.cc
366 ++++ src/pf-del.cc
367 +@@ -24,6 +24,8 @@
368 + * a p-file.
369 + *
370 + */
371 ++#include "config.h"
372 ++
373 + #include <utility>
374 +
375 + #include "cssc.h"
376 +--- src/pfile.cc
377 ++++ src/pfile.cc
378 +@@ -23,6 +23,8 @@
379 + * Common members of the class sccs_pfile.
380 + *
381 + */
382 ++#include "config.h"
383 ++
384 + #include <errno.h>
385 +
386 + #include "cssc.h"
387 +--- src/prompt.cc
388 ++++ src/prompt.cc
389 +@@ -24,6 +24,8 @@
390 + *
391 + */
392 +
393 ++#include "config.h"
394 ++
395 + #include <cstdio>
396 + #include <cstring>
397 + #include <cstdio>
398 +--- src/prs.cc
399 ++++ src/prs.cc
400 +@@ -24,6 +24,7 @@
401 + *
402 + */
403 +
404 ++#include <config.h>
405 + #include "cssc.h"
406 + #include "fileiter.h"
407 + #include "sccsfile.h"
408 +--- src/prt.cc
409 ++++ src/prt.cc
410 +@@ -26,6 +26,7 @@
411 + */
412 +
413 +
414 ++#include <config.h>
415 + #include "cssc.h"
416 + #include "fileiter.h"
417 + #include "sccsfile.h"
418 +--- src/quit.cc
419 ++++ src/quit.cc
420 +@@ -23,6 +23,8 @@
421 + * Functions for cleaning up and quitting.
422 + *
423 + */
424 ++#include "config.h"
425 ++
426 + #include <cstdio>
427 + #include <cstring>
428 + #include <cerrno>
429 +--- src/rel_list.cc
430 ++++ src/rel_list.cc
431 +@@ -20,6 +20,7 @@
432 + * placed in the Public Domain.
433 + *
434 + */
435 ++#include "config.h"
436 + #include <cstdlib>
437 +
438 + #include "cssc.h"
439 +--- src/rl-merge.cc
440 ++++ src/rl-merge.cc
441 +@@ -22,6 +22,7 @@
442 + *
443 + */
444 +
445 ++#include <config.h>
446 + #include "cssc.h"
447 + #include "rel_list.h"
448 +
449 +--- src/rmdel.cc
450 ++++ src/rmdel.cc
451 +@@ -25,6 +25,7 @@
452 + *
453 + */
454 +
455 ++#include <config.h>
456 + #include "cssc.h"
457 + #include "fileiter.h"
458 + #include "sccsfile.h"
459 +--- src/run.cc
460 ++++ src/run.cc
461 +@@ -24,6 +24,8 @@
462 + * Routines for running programmes.
463 + *
464 + */
465 ++#include "config.h"
466 ++
467 + #include <cstdio>
468 + #include <errno.h>
469 +
470 +--- src/sact.cc
471 ++++ src/sact.cc
472 +@@ -25,6 +25,7 @@
473 + *
474 + */
475 +
476 ++#include <config.h>
477 + #include "cssc.h"
478 + #include "fileiter.h"
479 + #include "pfile.h"
480 +--- src/sccs-delta.cc
481 ++++ src/sccs-delta.cc
482 +@@ -25,6 +25,7 @@
483 + *
484 + */
485 +
486 ++#include <config.h>
487 + #include "cssc.h"
488 + #include "sccsfile.h"
489 + #include "delta.h"
490 +--- src/sccsdate.cc
491 ++++ src/sccsdate.cc
492 +@@ -24,6 +24,7 @@
493 + * Members of the class sccs_date.
494 + *
495 + */
496 ++#include <config.h>
497 + #include <cstring>
498 +
499 + #include "cssc.h"
500 +--- src/sccsfile.cc
501 ++++ src/sccsfile.cc
502 +@@ -25,6 +25,7 @@
503 + * the members in this file are used to read from the SCCS file.
504 + *
505 + */
506 ++#include <config.h>
507 + #include <errno.h>
508 +
509 + #include "cssc.h"
510 +--- src/sccsname.cc
511 ++++ src/sccsname.cc
512 +@@ -25,6 +25,7 @@
513 + *
514 + */
515 +
516 ++#include <config.h>
517 + #include "cssc.h"
518 + #include "sccsname.h"
519 + #include "cssc-assert.h"
520 +--- src/seqstate.cc
521 ++++ src/seqstate.cc
522 +@@ -21,6 +21,7 @@
523 + *
524 + */
525 +
526 ++#include <config.h>
527 + #include "cssc.h"
528 + #include "seqstate.h"
529 +
530 +--- src/sf-add.cc
531 ++++ src/sf-add.cc
532 +@@ -26,6 +26,7 @@
533 + *
534 + */
535 +
536 ++#include <config.h>
537 + #include "cssc.h"
538 + #include "sccsfile.h"
539 + #include "delta.h"
540 +--- src/sf-admin.cc
541 ++++ src/sf-admin.cc
542 +@@ -26,6 +26,7 @@
543 + *
544 + */
545 +
546 ++#include <config.h>
547 + #include "cssc.h"
548 + #include "sccsfile.h"
549 + #include "sl-merge.h"
550 +--- src/sf-cdc.cc
551 ++++ src/sf-cdc.cc
552 +@@ -26,6 +26,7 @@
553 + *
554 + */
555 +
556 ++#include <config.h>
557 + #include "cssc.h"
558 + #include "sccsfile.h"
559 + #include "delta.h"
560 +--- src/sf-chkid.cc
561 ++++ src/sf-chkid.cc
562 +@@ -23,13 +23,15 @@
563 + *
564 + */
565 +
566 ++#include <config.h>
567 ++
568 ++#include <string.h>
569 ++
570 + #include "cssc.h"
571 + #include "sccsfile.h"
572 + #include "linebuf.h"
573 + #include "bodyio.h"
574 +
575 +-#include <string.h>
576 +-
577 + bool
578 + is_id_keyword_letter(char ch)
579 + {
580 +--- src/sf-delta.cc
581 ++++ src/sf-delta.cc
582 +@@ -25,7 +25,10 @@
583 + * Members of sccs_file for adding a delta to the SCCS file.
584 + *
585 + */
586 ++#include <config.h>
587 ++
588 + #include <errno.h>
589 ++#include <unistd.h>
590 +
591 + #include "cssc.h"
592 + #include "sccsfile.h"
593 +@@ -43,9 +46,6 @@
594 +
595 + #undef JAY_DEBUG
596 +
597 +-#include <unistd.h>
598 +-
599 +-
600 +
601 + class diff_state
602 + {
603 +--- src/sf-get.cc
604 ++++ src/sf-get.cc
605 +@@ -26,6 +26,8 @@
606 + *
607 + */
608 +
609 ++#include <config.h>
610 ++
611 + #include "cssc.h"
612 + #include "sccsfile.h"
613 + #include "pfile.h"
614 +--- src/sf-get2.cc
615 ++++ src/sf-get2.cc
616 +@@ -25,6 +25,10 @@
617 + *
618 + */
619 +
620 ++#include <config.h>
621 ++
622 ++#include <ctype.h>
623 ++
624 + #include "cssc.h"
625 + #include "sccsfile.h"
626 + #include "pfile.h"
627 +@@ -33,8 +37,6 @@
628 + #include "delta-table.h"
629 +
630 +
631 +-#include <ctype.h>
632 +-
633 + bool sccs_file::sid_matches(const sid& requested,
634 + const sid& found,
635 + bool get_top_delta) const
636 +--- src/sf-get3.cc
637 ++++ src/sf-get3.cc
638 +@@ -25,6 +25,8 @@
639 + *
640 + */
641 +
642 ++#include <config.h>
643 ++
644 + #include "cssc.h"
645 + #include "sccsfile.h"
646 + #include "seqstate.h"
647 +--- src/sf-kw.cc
648 ++++ src/sf-kw.cc
649 +@@ -21,6 +21,8 @@
650 + * sccs_file::no_id_keywords()
651 + */
652 +
653 ++#include <config.h>
654 ++
655 + #include "cssc.h"
656 + #include "sccsfile.h"
657 + #include "except.h"
658 +--- src/sf-prs.cc
659 ++++ src/sf-prs.cc
660 +@@ -27,6 +27,8 @@
661 + *
662 + */
663 +
664 ++#include <config.h>
665 ++
666 + #include "cssc.h"
667 + #include "sccsfile.h"
668 + #include "seqstate.h"
669 +--- src/sf-prt.cc
670 ++++ src/sf-prt.cc
671 +@@ -24,6 +24,8 @@
672 + */
673 +
674 +
675 ++#include <config.h>
676 ++
677 + #include "cssc.h"
678 + #include "sccsfile.h"
679 + #include "seqstate.h"
680 +--- src/sf-rmdel.cc
681 ++++ src/sf-rmdel.cc
682 +@@ -26,6 +26,8 @@
683 + *
684 + */
685 +
686 ++#include <config.h>
687 ++
688 + #include "cssc.h"
689 + #include "sccsfile.h"
690 + #include "delta.h"
691 +--- src/sf-val.cc
692 ++++ src/sf-val.cc
693 +@@ -22,7 +22,10 @@
694 + * Members of class sccs_file used by "val".
695 + *
696 + */
697 ++#include <config.h>
698 ++
699 + #include <vector>
700 ++
701 + #include "cssc.h"
702 + #include "sccsfile.h"
703 + #include "delta.h"
704 +--- src/sf-write.cc
705 ++++ src/sf-write.cc
706 +@@ -26,6 +26,8 @@
707 + *
708 + */
709 +
710 ++#include <config.h>
711 ++
712 + #include "cssc.h"
713 + #include "sccsfile.h"
714 + #include "delta.h"
715 +--- src/sid.cc
716 ++++ src/sid.cc
717 +@@ -25,12 +25,14 @@
718 + *
719 + */
720 +
721 ++#include <config.h>
722 ++
723 ++#include <ctype.h>
724 ++
725 + #include "cssc.h"
726 + #include "sid.h"
727 + #include "ioerr.h"
728 +
729 +-#include <ctype.h>
730 +-
731 + mystring sid::as_string() const
732 + {
733 + char buf[32];
734 +--- src/unget.cc
735 ++++ src/unget.cc
736 +@@ -25,6 +25,8 @@
737 + *
738 + */
739 +
740 ++#include <config.h>
741 ++
742 + #include "cssc.h"
743 + #include "fileiter.h"
744 + #include "pfile.h"
745 +--- src/val.cc
746 ++++ src/val.cc
747 +@@ -21,6 +21,8 @@
748 + *
749 + */
750 +
751 ++#include <config.h>
752 ++
753 + #include "cssc.h"
754 + #include "fileiter.h"
755 + #include "sccsfile.h"
756 +--- src/writesubst.cc
757 ++++ src/writesubst.cc
758 +@@ -22,6 +22,8 @@
759 + *
760 + */
761 +
762 ++#include <config.h>
763 ++
764 + #include "cssc.h"
765 + #include "sccsfile.h"
766 + #include "delta.h"

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut