Sunday, July 1, 2012

Backporting: Patching Waverous from Stunt

Today I wrapped up a bit of work needed in db_file.c where the TRY/EXCEPT/ENDTRY macros were replaced with their respective code. Somehow one block went missing during the patching process, and I compared files by eyeball between Stunt and Waverous to figure out where things went wrong.

I then applied a change from Stunt to Waverous, the first such change: Todd found the files ref_count.h and ref_count.c were never used since their innards were never seen by the compiler, being hidden by #IF 0 ... #ENDIF blocks.

I cleaned up Waverous's Makefile.in dependency list the usual hard way, which means getting the project to compile and running make depend. I have to revisit how this is done some day because there has to be a better way. Maybe this approach will work. (Edit: actually, with a little bit of thought it isn't necessary to get the project to compile... one just has to run the bison command plus a couple others to generate y.tab.h and parser.c, and then make depend will work fine).

I finally found what I was looking for in git: git-format-patch. Running this in the Waverous project for every commit from where I am now in the commit history to HEAD, I get 223 files. This sounds worse than it actually is:

bash-3.2$ git format-patch 763e7648518c54cf011f4df6011cc796b6838175^..HEAD
0001-Another-questionable-change-that-could-cause-headach.patch
0002-largely-cast-fixes-and-replacing-new-with-_new.patch
0003-Another-one-to-watch-out-for-as-I-did-this.patch
0004-More-cast-fixes-should-have-all-instances-of-try-as-.patch
0005-A-tricky-one.-The-passed-in-data-struct-pointer-was-.patch
0006-Minor-cast-fix.-But-casting-TYPE_STR-is-getting-to-b.patch
0007-Changed-void-to-int-to-satisfy-longjmp-note-that-cb-.patch
0008-The-biggest-issue-in-this-commit-was-the-copying-of-.patch
0009-For-now-committing-this-even-though-the-compiler-iss.patch
0010-Oops.-Accidentally-converted-this_arm-to-self_arm-wh.patch
0011-Fixing-a-few-more-enum-comparisons-the-compiler-didn.patch
0012-Casts-all-around-to-satisfy-the-compiler.patch
0013-There-were-a-few-cases-of-__new-and-new-which-should.patch
0014-one-cast-to-fix-this-file-for-our-old-void-pointer-f.patch
0015-Moved-an-enum-out-of-a-struct-so-it-would-be-in-scop.patch
0016-one-_new-and-a-number-of-casts-made.patch
0017-scratch-file-to-be-deleted-later-list-of-occurances-.patch
0018-ignoring-the-TAGS-file.patch
0019-Added-comment-pointing-to-the-CPP-manual-explaining-.patch
0020-after-macro-expansion-g-complained-that.patch
0021-Fixed-calls-to-getsockname-with-casts.patch
0022-Borrowed-the-definition-of-the-struct-exception-from.patch
0023-various-casts-to-make-the-compiler-happy.patch
0024-More-cast-fixes.patch
0025-Casts-but-these-are-rather-suspicious-to-me.patch
0026-assorted-casts-none-too-scary-looking.patch
0027-Fixing-up-the-function-signatures-so-it-passes-g-.-T.patch
0028-Made-a-goof-changing-the-function-signature-omitting.patch
0029-Fixed-several-function-signatures-which-were-using-p.patch
0030-Some-casts-and-an-accidental-change-of-this_program-.patch
0031-More-casts-one-set-of-macros-expanded-to-fix-casting.patch
0032-fixed-a-missed-catch-keyword-changed-to-_catch-and-a.patch
0033-Casts-and-two-places-there-s-an-in-an-if-statement-w.patch
0034-Fix-cast-to-var_type.patch
0035-Added-workaround-for-casting-a-bitmask-operation.patch
0036-Another-casting-fix-to-get-rid-of-the-compiler-s-com.patch
0037-I-commented-out-the-definition-of-var_type-an-enum-i.patch
0038-cleaning-up-scripts-used-to-massage-the-code-base.patch
0039-cleaning-up-scripts-used-to-massage-the-code-base.patch
0040-cleaning-up-scripts-used-to-massage-the-code-base.patch
0041-cleaning-up-scripts-used-to-massage-the-code-base.patch
0042-Previously-in-execute.c-I-copied-an-enum-out-of-a-st.patch
0043-adding-FUP-to-the-project-not-yet-compiled-in-just-a.patch
0044-temporarily-stashing-this-in-svn-so-I-don-t-lose-it.patch
0045-commiting-Avalon-patch-files-for-now-will-delete-lat.patch
0046-adding-LambdaCore-database.patch
0047-Adding-FUP-files-per-install-instructions.patch
0048-Tweaks-to-compile-on-RedHat-based-linux-system.patch
0049-Tweak-to-let-crypt-be-found-on-linux-use-the-header-.patch
0050-Tweak-to-let-lrand48-be-found-on-linux-use-the-heade.patch
0051-applied-first-avalon-patch-tORIGINAL-d20040322.patch.patch
0052-applied-d20040322-d20040323.patch.patch
0053-applied-d20040323-d20040415.patch.patch
0054-applied-d20040415-d20040416.patch.patch
0055-applied-d20040416-d20041022.patch.patch
0056-applied-d20041022-d20050324.patch.patch
0057-applied-d20050327-d20051106.patch.patch
0058-applied-d20051106-d20051107.patch.patch
0059-Resolved-the-issues-with-expat-and-ident-and-the-cas.patch
0060-removing-ident-stuff-specifically-commented-it-out-o.patch
0061-This-largish-commit-is-mostly-the-work-of-Merlin-and.patch
0062-cleaning-up.patch
0063-oops-missed-one-new-file-to-commit.patch
0064-handle-nil-value-gracefully.patch
0065-Adding-a-tools-directory-and-two-of-Neil-Fraser-s-mo.patch
0066-Rudimentary-script-to-test-the-server.patch
0067-Minor-formatting-change.patch
0068-minor-formatting-change.patch
0069-adding-braces-so-Wall-does-not-complain-about-no-exp.patch
0070-Changed-the-formatter-in-printf-to-ld-to-satisfy-gcc.patch
0071-Linux-on-the-other-hand-does-not-like-ld-at-all-so-s.patch
0072-I-changed-the-printf-s-to-cout-s-to-try-to-make-the-.patch
0073-It-seems-for-Fedora-14-strchr-does-not-want-a-const-.patch
0074-removing-ending-comma-which-pedantic-errors-complain.patch
0075-Cleaning-up-warnings-generated-when-compiled-with-pe.patch
0076-Cleaning-up-warnings-generated-when-compiled-with-pe.patch
0077-though-I-don-t-see-what-the-deal-is-the-compiler-war.patch
0078-removing-unused-variable-timeout-from-proto_accept_c.patch
0079-Added-a-ifndef-for-INT32_MAX-which-is-predefined-by-.patch
0080-annotating-a-function-even-if-briefly.patch
0081-Adding-Neil-Fraser-s-Python-tool-to-convert-a-Moo-da.patch
0082-Minor-cleanup-creating-a-directory-to-store-database.patch
0083-Adding-a-set-of-moo-objects-I-ve-written-over-the-ye.patch
0084-added-a-note-about-missing-features-causing-objects-.patch
0085-directory-to-store-random-artifacts-like-patch-files.patch
0086-I-found-this-via-some-link-for-the-enCore-database-f.patch
0087-I-forget-where-I-picked-up-this-patch-but-it-shows-o.patch
0088-adding-JHCore-database-and-its-copyright-notice.patch
0089-gzipping-the-db-files-for-massive-space-savings.patch
0090-adding-config.log-and-config.cache-to-distclean.patch
0091-commenting-the-rule-pure_moo-purify-is-a-memory-acce.patch
0092-main-must-return-int-claims-g.patch
0093-noting-that-Pavel-used-a-custom-build-of-gperf-to-ge.patch
0094-fixing-the-subpath-to-Minimal.db.patch
0095-removed-the-t-flag-to-etags-which-it-doesn-t-have.-t.patch
0096-This-copy-of-configure.in-comes-from-wp-lambdamoo-of.patch
0097-ed-not-found-on-my-system-changing-it-to-ex.patch
0098-added-configure_input.patch
0099-Updated-versions-of-configure.in-and-the-generated-c.patch
0100-changing-AC_CONFIG_HEADER-to-AC_CONFIG_HEADERS-per-t.patch
0101-quoting-the-argument-to-AC_CONFIG_HEADERS.patch
0102-I-m-removing-the-hardcoded-definition-of-the-compile.patch
0103-Turns-out-I-just-needed-to-change-AC_PROG_CC-to-AC_P.patch
0104-New-generated-configure-file.patch
0105-default-to-m32-for-compiles-since-the-server-is-not-.patch
0106-I-added-the-following.patch
0107-Removing-the-distribution-making-rule-and-its-variab.patch
0108-Basic-top-level-Makefile-the-main-use-being-to-build.patch
0109-getting-rid-of-this-cvs-cruft.patch
0110-Creating-a-chrooted-environment-to-run-waverous-in.patch
0111-Removing-trailing-comma-to-make-pedantic-happy.patch
0112-Ran-GNU-indent-on-all-.h-and-.c-files-to-standardize.patch
0113-Cleanup-removing-all-the-old-rcs-string-constants-an.patch
0114-Currently-this-generates-HTML-only-i.e.-no-Latex-or-.patch
0115-removed-old-CVS-log-entries.patch
0116-removed-outdated-bits-updated-others.patch
0117-Renamed-task_queue-to-TaskQueue-as-a-start-to-making.patch
0118-Removing-more-hopefull-all-of-the-CVS-log-entries-an.patch
0119-Reformatted-struct-names-that-are-internal-to-this-m.patch
0120-In-options.h-it-was-noted-that-using-a-copy-of-GNU-s.patch
0121-removed-CVS-log-entries.patch
0122-commenting-what-a-static-inline-function-is-in-C-ter.patch
0123-Experimental-patch-that-converts-the-Task-struct-to-.patch
0124-1-CPPFLAGS-was-used-but-never-defined-I-ve-added-the.patch
0125-Adding-install-sh-per-the-GNU-Coding-Standards-the-m.patch
0126-stripped-out-old-CVS-log-entries.patch
0127-1-I-don-t-think-anyone-needs-to-mail-Pavil-anymore-r.patch
0128-newest-generated-configure-script.patch
0129-Check-for-expat.h-and-don-t-check-for-the-expat-libr.patch
0130-I-ve-removed-the-DEXPAT_XML-flag-from-the-compiler-f.patch
0131-added-the-standard-DEFS-DEFS-variable-and-DEFS-to-th.patch
0132-I-ve-added-conditionals-to-configure.in-to-test-if.patch
0133-typo-fix-missing-space.patch
0134-I-ve-removed-the-patches-for-configure-aclocal.m4-an.patch
0135-Now-the-user-can-specify-enable-expat-yes-no-to-.-co.patch
0136-Added-ifdef-endif-around-the-code-to-handle-conditio.patch
0137-Added-ifdef-endif-around-the-externs-and-function-ca.patch
0138-Added-USE_EXT_FUP-and-HAVE_EXPAT_H-for-conditional-c.patch
0139-Broke-out-ext-xml.c-from-the-main-group-of-source-fi.patch
0140-Let-the-user-choose-whether-to-include-expat-or-FUP-.patch
0141-Preparing-for-beta2-soonish.patch
0142-Updating-the-name-from-configure.in-to-configure.ac-.patch
0143-updating-the-rule-for-configure.in-to-confiture.ac.patch
0144-Experimental-you-can-now-say-.-configure-enable-open.patch
0145-The-macro-AC_TEST_PROGRAM-was-deprecated-and-replace.patch
0146-yet-another-newest-version-of-configure.patch
0147-Rolling-back-my-changes-for-now-not-sure-why-all-the.patch
0148-I-was-running-into-the-problem-of-in-gdb-linux-I-cou.patch
0149-Documented-the-depend-target-which-requires-files-ge.patch
0150-I-ve-changed-the-configure-options-from-enable-woobl.patch
0151-README-file-added-to-explain-this-directory-and-the-.patch
0152-removing-extraneous-lines-from-chroot.sh.patch
0153-Renaming-this-to-waverous-tester.exp-and-giving-it-t.patch
0154-Renamed-this-file-to-waverous-tester.exp.patch
0155-Adding-the-files-for-fileio.patch
0156-Adding-a-LICENSE-file-to-clarify-all-the-licenses-fo.patch
0157-Inserting-the-license-for-this-file-that-exists-in-a.patch
0158-Adding-the-license-on-behalf-of-Andy.patch
0159-Adding-the-licensing-that-goes-with-this-file.patch
0160-Commenting-on-the-licensing-of-this-file.patch
0161-Expounding-some-more-on-the-licensing-of-the-sources.patch
0162-Renaming-restart.sh-to-mooctl-in-line-with-scripts-i.patch
0163-Updating-the-instructions-by-s-restart-mooctl-g.-Not.patch
0164-Use-0-instead-of-the-script-name-use-gzip-instead-of.patch
0165-testbed-for-playing-with-the-features-of-getopt_long.patch
0166-Got-rid-of-optreset-which-GNU-didn-t-like-and-I-wasn.patch
0167-Explanatory-comments-for-the-case-of-zero.patch
0168-Moved-the-option-to-log-user-commands-in-the-event-o.patch
0169-Adding-the-MCP-2.1-implementation-updating-the-READM.patch
0170-Moved-UNFORKED_CHECKPOINTS-into-.-configure-and-frie.patch
0171-Minor-formatting-update.patch
0172-Redid-the-no-forking-configure-option-is-now-with-fo.patch
0173-Including-licensing-info-for-the-external-package-Fi.patch
0174-Notes-on-what-to-add-in-this-prototype-of-command-li.patch
0175-Largish-commit-to-add-finally-the-package-File-I-O-a.patch
0176-Two-file-wide-changes-and-one-small-one.patch
0177-Small-object-to-test-File-I-O.patch
0178-Added-a-small-example-for-file_open.patch
0179-Fixed-the-dumb-mistakes-I-made-in-my-first-attempt-t.patch
0180-Bumped-up-the-version-number-of-Waverous-tweaked-the.patch
0181-Updated-configure-file.patch
0182-Note-added-about-make-install-in-the-future.patch
0183-Changed-the-default-text-editor-mode-from-c-to-autoc.patch
0184-Dropped-pgperf-the-customized-verion-of-GNU-gperf-th.patch
0185-Removed-pgperf-from-the-LICENSE-file-as-it-s-no-long.patch
0186-Check-for-GNU-gperf-issue-a-warning-if-not-found.-gp.patch
0187-Latest-.-configure-script.patch
0188-Dropping-LambdaMOO-specific-redeclaration-of-AC_FUNC.patch
0189-Removed-checks-for-AUX-ALPHA-NeXT-SGI-HPUX.patch
0190-Moved-the-custom-MOO-m4-macros-into-their-own-file-i.patch
0191-Missing-quote-in-a-comment-fixed.patch
0192-Dropping-the-test-to-see-if-malloc-is-defined-in-std.patch
0193-Further-removing-MOO_MALLOC_H-from-configure.patch
0194-By-specifying-C-as-the-project-language-via-the-auto.patch
0195-At-some-point-in-the-past-I-modified-the-JHCore-db-b.patch
0196-Removing-the-test-for-bzero.-In-some-older-systems-i.patch
0197-Latest-configure.patch
0198-Dropping-the-test-for-the-compiler-s-support-for-the.patch
0199-Latest-configure-file.patch
0200-Next-version-number-will-be-0.2-instead-of-beta2.patch
0201-Removing-errant-use-of-AC_PREREQ-which-autoconf-2.61.patch
0202-I-dunno-if-I-have-the-wrong-version-of-aclocal-or-wh.patch
0203-Latest-.-configure-file-created-by-autoconf.patch
0204-Somehow-I-missed-the-call-to-MOO_CONST-and-autoconf-.patch
0205-Updated-.-configure-script-with-no-more-MOO_CONST.patch
0206-Make-OUTBOUND_NETWORK-a-configure-option.patch
0207-First-cut-at-crediting-the-authors-for-the-conversio.patch
0208-Updated-the-authors-list.patch
0209-Updated-authors-list-again.patch
0210-Adding-the-other-two-canonical-programmer-user-refer.patch
0211-Xythian-s-.gitignore-from-lambdamoo-on-github.patch
0212-Example-make-distcheck-per-the-Autotools-book.patch
0213-Removed-CVS-log-entries.patch
0214-New-version-of-autoconf-thus-new-version-of-.-config.patch
0215-Temporary-log-file-I-m-working-off-of-while-patching.patch
0216-I-m-marking-blocks-with-leading-semicolons-to-note-w.patch
0217-Fix-void-pointer-problems-when-BYTECODE_REDUCE_REF-i.patch
0218-Commented-out-SHAs-I-ve-applied-as-patches-to-Stunt-.patch
0219-Marked-another-commit-as-patched-to-Stunt.patch
0220-Porting-a-change-over-from-Stunt-ref_count.-hc-are-n.patch
0221-Removed-references-to-ref_count.h.patch
0222-Added-some-needed-macros-like-delref-copied-from-Stu.patch
0223-Removed-all-references-to-ref_count.h-and-ref_count..patch
Many of these are not germane to porting Stunt to C++. Some have funny names, and it's a lesson on why one should start every commit with what looks like a Subject: line, something I hadn't adopted while working in Subversion.

No comments:

Post a Comment