From nobody Thu Sep 07 14:51:04 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RhMcn4P3Mz4sngx; Thu, 7 Sep 2023 14:51:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RhMcm6wY1z4kxd; Thu, 7 Sep 2023 14:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694098264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cG6R7uHwIvQDLKxRGzt6Z3OAukW3VQ4h5SKJTCaFWMg=; b=KACoIF71JtTbrcwIn8/YP4nIHpCZG8dYFqvZu18XKSw+/js2tuWtgSlFKKiTcHGbLnnO3C iX1J0/2xzwbMn4vwoMnf5n7u9Q3z3/LKByaWT+c4WqpVf0KBUjR7mbwMDwB2AGUS8qreEV JNWbWYdIgYkvp4wkdPm64FFmK0s0CP322Pym3ULl5fl7vxot3k28EU0PomScVno5OtQmuD T7AQ9RS4vkY8kDXaGJOr+0+ZIeZ19RYJJ6AtEIaQ17WBz2047GLaLLzNjSfx7rmaC/NntX F3ocFYsKkj6117R882yk2nbuelmiRX9XEOwNC6IIAljaqwmljn2RRKA9VdufUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694098264; a=rsa-sha256; cv=none; b=dhMV9hG8xtMYFBV6qLd5Jo8bkO6i1t+6+1UlWoWDesaHol2vONMeXym4fYII6qm3bKV9VD oEygGFE7xf4PCEpJ2F+m6vRnbGcR2SbDSkwpbHAjIXuM1Tx9xfY7Xgb5k7c7AE0I1aLBkx 1lZjBnOaiwyS/U2sHetS5bu64Pq0/SEyvFqUzbLUnouuAtJjH/AUFozcX2ITuHZtKpKeBH ph8exsQyLn02+ULyI5+R3/1NWNvAYsW+KaLYAPm4VE/WuPuqoLPbmDoG6Dsvm1Ylf3uW5H sN1imKX6fLSA3xgNqG2I0jVKFxDbaiv72e6rzpml8qfAMS9WskAc30oYI58C+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694098264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cG6R7uHwIvQDLKxRGzt6Z3OAukW3VQ4h5SKJTCaFWMg=; b=jgNVRRHARF/6D1DyLzUArO5VL2i7NYBf0xBZ2Qaa1ojYMkdgmYO90QgHzxMXS9oPVAI0Co 1oceXGIWtQDjgNr8HACczPCcAqu9oHbtsuvpQTsP3/hJtlo9fxCQgPfgwCRXcBiAYMXuWz DtM2bjboSwZ/DaojKsH5mQ0nwxpdujt4KyyY42kpYFXi8JKI4cs8LNadXBiWUE8DUBJRW/ nGfovRFlyFdG5S/vbwT5wkG+TPUaFEgqId2PPsmsIjvt8S+nKov3VEz918PoZzmx+IuERv CYIqTfPUSztn7alYWoF2lsbQxF7p/IJ1M/8i7eIvxUmZlrGgr+DrvHHZII6HXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RhMcm5yN6z13JV; Thu, 7 Sep 2023 14:51:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 387Ep4AN013067; Thu, 7 Sep 2023 14:51:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 387Ep42t013062; Thu, 7 Sep 2023 14:51:04 GMT (envelope-from git) Date: Thu, 7 Sep 2023 14:51:04 GMT Message-Id: <202309071451.387Ep42t013062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: cf1b93786f87 - stable/13 - Add 'contrib/unifdef/' from commit '0da44885831dc0a43c4ca6ff04a2430993cc0a80' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cf1b93786f876d500dadc1cf65bee663be3a4d35 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cf1b93786f876d500dadc1cf65bee663be3a4d35 commit cf1b93786f876d500dadc1cf65bee663be3a4d35 Author: Dag-Erling Smørgrav AuthorDate: 2023-08-21 17:51:03 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-07 08:59:35 +0000 Add 'contrib/unifdef/' from commit '0da44885831dc0a43c4ca6ff04a2430993cc0a80' git-subtree-dir: contrib/unifdef git-subtree-mainline: 3b7ffacdee49f90716cba2bcf8af3fc1971ae031 git-subtree-split: 0da44885831dc0a43c4ca6ff04a2430993cc0a80 (cherry picked from commit fb3ef04d2028110f06d68b09009f1f2ca0f4128e) unifdef: Reapply our 61287be18189. (cherry picked from commit 343b776fd0280f4dc95a1a61fd9ac40c78ce684e) unifdef: Reapply our 7102ec5226e5. (cherry picked from commit 049b7608f41bf4e93ac6de718c45bef261f6977d) --- contrib/unifdef/.gitignore | 7 + contrib/unifdef/.travis.yml | 59 + contrib/unifdef/COPYING | 85 ++ contrib/unifdef/FreeBSD/err.c | 138 ++ contrib/unifdef/FreeBSD/getopt.c | 118 ++ contrib/unifdef/INSTALL | 36 + contrib/unifdef/Makefile | 58 + contrib/unifdef/README | 53 + contrib/unifdef/ifdef-how.pl | 42 + contrib/unifdef/scripts/authors.svn | 15 + contrib/unifdef/scripts/copycheck.sh | 21 + contrib/unifdef/scripts/fixtests.sh | 9 + contrib/unifdef/scripts/git.config | 10 + contrib/unifdef/scripts/gitlog2changelog.sh | 9 + contrib/unifdef/scripts/release.sh | 18 + contrib/unifdef/scripts/reversion.sh | 41 + contrib/unifdef/scripts/runtests.sh | 38 + contrib/unifdef/scripts/svnup.sh | 12 + contrib/unifdef/scripts/upload.sh | 19 + contrib/unifdef/tests/000-init.experr | 0 contrib/unifdef/tests/000-init.expout | 0 contrib/unifdef/tests/000-init.exprc | 1 + contrib/unifdef/tests/000-init.sh | 1 + contrib/unifdef/tests/NetBSD-42628.c | 25 + contrib/unifdef/tests/NetBSD-42628.experr | 0 contrib/unifdef/tests/NetBSD-42628.expout | 6 + contrib/unifdef/tests/NetBSD-42628.exprc | 1 + contrib/unifdef/tests/NetBSD-42628.sh | 1 + contrib/unifdef/tests/NetBSD-47068.c | 2 + contrib/unifdef/tests/NetBSD-47068.experr | 0 contrib/unifdef/tests/NetBSD-47068.expout | 2 + contrib/unifdef/tests/NetBSD-47068.exprc | 1 + contrib/unifdef/tests/NetBSD-47068.sh | 1 + contrib/unifdef/tests/args1.c | 3 + contrib/unifdef/tests/args1.experr | 0 contrib/unifdef/tests/args1.expout | 1 + contrib/unifdef/tests/args1.exprc | 1 + contrib/unifdef/tests/args1.sh | 1 + contrib/unifdef/tests/args2.c | 3 + contrib/unifdef/tests/args2.experr | 0 contrib/unifdef/tests/args2.expout | 3 + contrib/unifdef/tests/args2.exprc | 1 + contrib/unifdef/tests/args2.sh | 1 + contrib/unifdef/tests/blank0d.c | 25 + contrib/unifdef/tests/blank0d.experr | 0 contrib/unifdef/tests/blank0d.expout | 23 + contrib/unifdef/tests/blank0d.exprc | 1 + contrib/unifdef/tests/blank0d.sh | 1 + contrib/unifdef/tests/blank0u.c | 25 + contrib/unifdef/tests/blank0u.experr | 0 contrib/unifdef/tests/blank0u.expout | 22 + contrib/unifdef/tests/blank0u.exprc | 1 + contrib/unifdef/tests/blank0u.sh | 1 + contrib/unifdef/tests/blank1d.c | 25 + contrib/unifdef/tests/blank1d.experr | 0 contrib/unifdef/tests/blank1d.expout | 23 + contrib/unifdef/tests/blank1d.exprc | 1 + contrib/unifdef/tests/blank1d.sh | 1 + contrib/unifdef/tests/blank1u.c | 25 + contrib/unifdef/tests/blank1u.experr | 0 contrib/unifdef/tests/blank1u.expout | 21 + contrib/unifdef/tests/blank1u.exprc | 1 + contrib/unifdef/tests/blank1u.sh | 1 + contrib/unifdef/tests/blank2d.c | 25 + contrib/unifdef/tests/blank2d.experr | 0 contrib/unifdef/tests/blank2d.expout | 23 + contrib/unifdef/tests/blank2d.exprc | 1 + contrib/unifdef/tests/blank2d.sh | 1 + contrib/unifdef/tests/blank2u.c | 25 + contrib/unifdef/tests/blank2u.experr | 0 contrib/unifdef/tests/blank2u.expout | 20 + contrib/unifdef/tests/blank2u.exprc | 1 + contrib/unifdef/tests/blank2u.sh | 1 + contrib/unifdef/tests/blank3d.c | 25 + contrib/unifdef/tests/blank3d.experr | 0 contrib/unifdef/tests/blank3d.expout | 23 + contrib/unifdef/tests/blank3d.exprc | 1 + contrib/unifdef/tests/blank3d.sh | 1 + contrib/unifdef/tests/blank3u.c | 25 + contrib/unifdef/tests/blank3u.experr | 0 contrib/unifdef/tests/blank3u.expout | 19 + contrib/unifdef/tests/blank3u.exprc | 1 + contrib/unifdef/tests/blank3u.sh | 1 + contrib/unifdef/tests/blank4d.c | 25 + contrib/unifdef/tests/blank4d.experr | 0 contrib/unifdef/tests/blank4d.expout | 23 + contrib/unifdef/tests/blank4d.exprc | 1 + contrib/unifdef/tests/blank4d.sh | 1 + contrib/unifdef/tests/blank4u.c | 25 + contrib/unifdef/tests/blank4u.experr | 0 contrib/unifdef/tests/blank4u.expout | 18 + contrib/unifdef/tests/blank4u.exprc | 1 + contrib/unifdef/tests/blank4u.sh | 1 + contrib/unifdef/tests/broken2.h | 1 + contrib/unifdef/tests/broken3.h | 1 + contrib/unifdef/tests/broken4.h | 2 + contrib/unifdef/tests/crlf-a.experr | 0 contrib/unifdef/tests/crlf-a.expout | 10 + contrib/unifdef/tests/crlf-a.exprc | 1 + contrib/unifdef/tests/crlf-a.sh | 1 + contrib/unifdef/tests/crlf-b.experr | 0 contrib/unifdef/tests/crlf-b.expout | 14 + contrib/unifdef/tests/crlf-b.exprc | 1 + contrib/unifdef/tests/crlf-b.sh | 1 + contrib/unifdef/tests/crlf-c.experr | 0 contrib/unifdef/tests/crlf-c.expout | 16 + contrib/unifdef/tests/crlf-c.exprc | 1 + contrib/unifdef/tests/crlf-c.sh | 1 + contrib/unifdef/tests/crlf-d.experr | 0 contrib/unifdef/tests/crlf-d.expout | 18 + contrib/unifdef/tests/crlf-d.exprc | 1 + contrib/unifdef/tests/crlf-d.sh | 1 + contrib/unifdef/tests/crlf.c | 20 + contrib/unifdef/tests/dangle.c | 6 + contrib/unifdef/tests/dangle.experr | 0 contrib/unifdef/tests/dangle.expout | 6 + contrib/unifdef/tests/dangle.exprc | 1 + contrib/unifdef/tests/dangle.sh | 1 + contrib/unifdef/tests/debian-603860.c | 8 + contrib/unifdef/tests/debian-603860.experr | 0 contrib/unifdef/tests/debian-603860.expout | 2 + contrib/unifdef/tests/debian-603860.exprc | 1 + contrib/unifdef/tests/debian-603860.sh | 1 + contrib/unifdef/tests/defundef-broken2.experr | 2 + contrib/unifdef/tests/defundef-broken2.expout | 0 contrib/unifdef/tests/defundef-broken2.exprc | 1 + contrib/unifdef/tests/defundef-broken2.sh | 1 + contrib/unifdef/tests/defundef-broken3.experr | 2 + contrib/unifdef/tests/defundef-broken3.expout | 0 contrib/unifdef/tests/defundef-broken3.exprc | 1 + contrib/unifdef/tests/defundef-broken3.sh | 1 + contrib/unifdef/tests/defundef-broken4.experr | 2 + contrib/unifdef/tests/defundef-broken4.expout | 0 contrib/unifdef/tests/defundef-broken4.exprc | 1 + contrib/unifdef/tests/defundef-broken4.sh | 1 + contrib/unifdef/tests/defundef-funlike.experr | 0 contrib/unifdef/tests/defundef-funlike.expout | 13 + contrib/unifdef/tests/defundef-funlike.exprc | 1 + contrib/unifdef/tests/defundef-funlike.sh | 1 + contrib/unifdef/tests/defundef-undefdef.experr | 0 contrib/unifdef/tests/defundef-undefdef.expout | 1 + contrib/unifdef/tests/defundef-undefdef.exprc | 1 + contrib/unifdef/tests/defundef-undefdef.sh | 1 + contrib/unifdef/tests/div.c | 3 + contrib/unifdef/tests/div.experr | 0 contrib/unifdef/tests/div.expout | 10 + contrib/unifdef/tests/div.exprc | 1 + contrib/unifdef/tests/div.sh | 10 + contrib/unifdef/tests/empty.c | 0 contrib/unifdef/tests/empty.experr | 0 contrib/unifdef/tests/empty.expout | 0 contrib/unifdef/tests/empty.exprc | 1 + contrib/unifdef/tests/empty.sh | 1 + contrib/unifdef/tests/error.c | 4 + contrib/unifdef/tests/error.experr | 0 contrib/unifdef/tests/error.expout | 2 + contrib/unifdef/tests/error.exprc | 1 + contrib/unifdef/tests/error.sh | 1 + contrib/unifdef/tests/exitmode0a.experr | 0 contrib/unifdef/tests/exitmode0a.expout | 16 + contrib/unifdef/tests/exitmode0a.exprc | 1 + contrib/unifdef/tests/exitmode0a.sh | 1 + contrib/unifdef/tests/exitmode0b.experr | 0 contrib/unifdef/tests/exitmode0b.expout | 26 + contrib/unifdef/tests/exitmode0b.exprc | 1 + contrib/unifdef/tests/exitmode0b.sh | 1 + contrib/unifdef/tests/exitmode1a.experr | 0 contrib/unifdef/tests/exitmode1a.expout | 16 + contrib/unifdef/tests/exitmode1a.exprc | 1 + contrib/unifdef/tests/exitmode1a.sh | 1 + contrib/unifdef/tests/exitmode1b.experr | 0 contrib/unifdef/tests/exitmode1b.expout | 26 + contrib/unifdef/tests/exitmode1b.exprc | 1 + contrib/unifdef/tests/exitmode1b.sh | 1 + contrib/unifdef/tests/exitmode2a.experr | 0 contrib/unifdef/tests/exitmode2a.expout | 16 + contrib/unifdef/tests/exitmode2a.exprc | 1 + contrib/unifdef/tests/exitmode2a.sh | 1 + contrib/unifdef/tests/exitmode2b.experr | 0 contrib/unifdef/tests/exitmode2b.expout | 26 + contrib/unifdef/tests/exitmode2b.exprc | 1 + contrib/unifdef/tests/exitmode2b.sh | 1 + contrib/unifdef/tests/exitstat.c | 3 + contrib/unifdef/tests/exitstat.experr | 0 contrib/unifdef/tests/exitstat.expout | 3 + contrib/unifdef/tests/exitstat.exprc | 1 + contrib/unifdef/tests/exitstat.sh | 1 + contrib/unifdef/tests/funlike.h | 1 + contrib/unifdef/tests/if1-a.experr | 0 contrib/unifdef/tests/if1-a.expout | 16 + contrib/unifdef/tests/if1-a.exprc | 1 + contrib/unifdef/tests/if1-a.sh | 1 + contrib/unifdef/tests/if1-f.experr | 0 contrib/unifdef/tests/if1-f.expout | 16 + contrib/unifdef/tests/if1-f.exprc | 1 + contrib/unifdef/tests/if1-f.sh | 1 + contrib/unifdef/tests/if1-k.c | 38 + contrib/unifdef/tests/if1-k.experr | 0 contrib/unifdef/tests/if1-k.expout | 30 + contrib/unifdef/tests/if1-k.exprc | 1 + contrib/unifdef/tests/if1-k.sh | 1 + contrib/unifdef/tests/if1-kDU.c | 38 + contrib/unifdef/tests/if1-kDU.experr | 0 contrib/unifdef/tests/if1-kDU.expout | 20 + contrib/unifdef/tests/if1-kDU.exprc | 1 + contrib/unifdef/tests/if1-kDU.sh | 1 + contrib/unifdef/tests/if1.c | 26 + contrib/unifdef/tests/if1.experr | 0 contrib/unifdef/tests/if1.expout | 16 + contrib/unifdef/tests/if1.exprc | 1 + contrib/unifdef/tests/if1.h | 3 + contrib/unifdef/tests/if1.sh | 1 + contrib/unifdef/tests/if1a.experr | 0 contrib/unifdef/tests/if1a.expout | 24 + contrib/unifdef/tests/if1a.exprc | 1 + contrib/unifdef/tests/if1a.sh | 1 + contrib/unifdef/tests/if2-a.experr | 0 contrib/unifdef/tests/if2-a.expout | 13 + contrib/unifdef/tests/if2-a.exprc | 1 + contrib/unifdef/tests/if2-a.sh | 1 + contrib/unifdef/tests/if2-k.c | 29 + contrib/unifdef/tests/if2-k.experr | 0 contrib/unifdef/tests/if2-k.expout | 21 + contrib/unifdef/tests/if2-k.exprc | 1 + contrib/unifdef/tests/if2-k.sh | 1 + contrib/unifdef/tests/if2-kDU.c | 29 + contrib/unifdef/tests/if2-kDU.experr | 0 contrib/unifdef/tests/if2-kDU.expout | 17 + contrib/unifdef/tests/if2-kDU.exprc | 1 + contrib/unifdef/tests/if2-kDU.sh | 1 + contrib/unifdef/tests/if2.c | 17 + contrib/unifdef/tests/if2.experr | 0 contrib/unifdef/tests/if2.expout | 13 + contrib/unifdef/tests/if2.exprc | 1 + contrib/unifdef/tests/if2.sh | 1 + contrib/unifdef/tests/if3-a.experr | 0 contrib/unifdef/tests/if3-a.expout | 13 + contrib/unifdef/tests/if3-a.exprc | 1 + contrib/unifdef/tests/if3-a.sh | 1 + contrib/unifdef/tests/if3-k.c | 29 + contrib/unifdef/tests/if3-k.experr | 0 contrib/unifdef/tests/if3-k.expout | 21 + contrib/unifdef/tests/if3-k.exprc | 1 + contrib/unifdef/tests/if3-k.sh | 1 + contrib/unifdef/tests/if3-kDU.c | 29 + contrib/unifdef/tests/if3-kDU.experr | 0 contrib/unifdef/tests/if3-kDU.expout | 17 + contrib/unifdef/tests/if3-kDU.exprc | 1 + contrib/unifdef/tests/if3-kDU.sh | 1 + contrib/unifdef/tests/if3.c | 17 + contrib/unifdef/tests/if3.experr | 0 contrib/unifdef/tests/if3.expout | 13 + contrib/unifdef/tests/if3.exprc | 1 + contrib/unifdef/tests/if3.sh | 1 + contrib/unifdef/tests/if4-a.experr | 0 contrib/unifdef/tests/if4-a.expout | 22 + contrib/unifdef/tests/if4-a.exprc | 1 + contrib/unifdef/tests/if4-a.sh | 1 + contrib/unifdef/tests/if4-k.c | 50 + contrib/unifdef/tests/if4-k.experr | 0 contrib/unifdef/tests/if4-k.expout | 42 + contrib/unifdef/tests/if4-k.exprc | 1 + contrib/unifdef/tests/if4-k.sh | 1 + contrib/unifdef/tests/if4-kDU.c | 50 + contrib/unifdef/tests/if4-kDU.experr | 0 contrib/unifdef/tests/if4-kDU.expout | 26 + contrib/unifdef/tests/if4-kDU.exprc | 1 + contrib/unifdef/tests/if4-kDU.sh | 1 + contrib/unifdef/tests/if4.c | 38 + contrib/unifdef/tests/if4.experr | 0 contrib/unifdef/tests/if4.expout | 22 + contrib/unifdef/tests/if4.exprc | 1 + contrib/unifdef/tests/if4.sh | 1 + contrib/unifdef/tests/if5-a.experr | 0 contrib/unifdef/tests/if5-a.expout | 40 + contrib/unifdef/tests/if5-a.exprc | 1 + contrib/unifdef/tests/if5-a.sh | 1 + contrib/unifdef/tests/if5-k.c | 64 + contrib/unifdef/tests/if5-k.experr | 0 contrib/unifdef/tests/if5-k.expout | 56 + contrib/unifdef/tests/if5-k.exprc | 1 + contrib/unifdef/tests/if5-k.sh | 1 + contrib/unifdef/tests/if5-kDU.c | 64 + contrib/unifdef/tests/if5-kDU.experr | 0 contrib/unifdef/tests/if5-kDU.expout | 32 + contrib/unifdef/tests/if5-kDU.exprc | 1 + contrib/unifdef/tests/if5-kDU.sh | 1 + contrib/unifdef/tests/if5.c | 80 ++ contrib/unifdef/tests/if5.experr | 0 contrib/unifdef/tests/if5.expout | 40 + contrib/unifdef/tests/if5.exprc | 1 + contrib/unifdef/tests/if5.sh | 1 + contrib/unifdef/tests/if6.c | 11 + contrib/unifdef/tests/if6.h | 2 + contrib/unifdef/tests/if6a.experr | 0 contrib/unifdef/tests/if6a.expout | 1 + contrib/unifdef/tests/if6a.exprc | 1 + contrib/unifdef/tests/if6a.sh | 1 + contrib/unifdef/tests/if6b.experr | 0 contrib/unifdef/tests/if6b.expout | 5 + contrib/unifdef/tests/if6b.exprc | 1 + contrib/unifdef/tests/if6b.sh | 1 + contrib/unifdef/tests/if6c.experr | 0 contrib/unifdef/tests/if6c.expout | 7 + contrib/unifdef/tests/if6c.exprc | 1 + contrib/unifdef/tests/if6c.sh | 1 + contrib/unifdef/tests/if6d.experr | 0 contrib/unifdef/tests/if6d.expout | 9 + contrib/unifdef/tests/if6d.exprc | 1 + contrib/unifdef/tests/if6d.sh | 1 + contrib/unifdef/tests/if7.c | 94 ++ contrib/unifdef/tests/if7.experr | 0 contrib/unifdef/tests/if7.expout | 46 + contrib/unifdef/tests/if7.exprc | 1 + contrib/unifdef/tests/if7.sh | 1 + contrib/unifdef/tests/indirect.experr | 0 contrib/unifdef/tests/indirect.expout | 16 + contrib/unifdef/tests/indirect.exprc | 1 + contrib/unifdef/tests/indirect.sh | 1 + contrib/unifdef/tests/multi-generic-sh | 15 + contrib/unifdef/tests/multi.experr | 0 contrib/unifdef/tests/multi.expout | 36 + contrib/unifdef/tests/multi.exprc | 1 + contrib/unifdef/tests/multi.sh | 3 + contrib/unifdef/tests/multilnnum.experr | 0 contrib/unifdef/tests/multilnnum.expout | 42 + contrib/unifdef/tests/multilnnum.exprc | 1 + contrib/unifdef/tests/multilnnum.sh | 3 + contrib/unifdef/tests/multimissing.experr | 4 + contrib/unifdef/tests/multimissing.expout | 22 + contrib/unifdef/tests/multimissing.exprc | 1 + contrib/unifdef/tests/multimissing.sh | 3 + contrib/unifdef/tests/multinewline.experr | 0 contrib/unifdef/tests/multinewline.expout | 39 + contrib/unifdef/tests/multinewline.exprc | 1 + contrib/unifdef/tests/multinewline.sh | 3 + contrib/unifdef/tests/none.c | 5 + contrib/unifdef/tests/none.experr | 0 contrib/unifdef/tests/none.expout | 5 + contrib/unifdef/tests/none.exprc | 1 + contrib/unifdef/tests/none.sh | 1 + contrib/unifdef/tests/outdir.experr | 0 contrib/unifdef/tests/outdir.expout | 16 + contrib/unifdef/tests/outdir.exprc | 1 + contrib/unifdef/tests/outdir.sh | 6 + contrib/unifdef/tests/outeperm.experr | 1 + contrib/unifdef/tests/outeperm.expout | 0 contrib/unifdef/tests/outeperm.exprc | 1 + contrib/unifdef/tests/outeperm.sh | 6 + contrib/unifdef/tests/outfile.experr | 0 contrib/unifdef/tests/outfile.expout | 16 + contrib/unifdef/tests/outfile.exprc | 1 + contrib/unifdef/tests/outfile.sh | 5 + contrib/unifdef/tests/outperms.experr | 1 + contrib/unifdef/tests/outperms.expout | 16 + contrib/unifdef/tests/outperms.exprc | 1 + contrib/unifdef/tests/outperms.sh | 10 + contrib/unifdef/tests/overdir.experr | 0 contrib/unifdef/tests/overdir.expout | 16 + contrib/unifdef/tests/overdir.exprc | 1 + contrib/unifdef/tests/overdir.sh | 7 + contrib/unifdef/tests/overenoent.experr | 1 + contrib/unifdef/tests/overenoent.expout | 0 contrib/unifdef/tests/overenoent.exprc | 1 + contrib/unifdef/tests/overenoent.sh | 5 + contrib/unifdef/tests/overin.experr | 0 contrib/unifdef/tests/overin.expout | 16 + contrib/unifdef/tests/overin.exprc | 1 + contrib/unifdef/tests/overin.sh | 6 + contrib/unifdef/tests/overlnnum.experr | 0 contrib/unifdef/tests/overlnnum.expout | 20 + contrib/unifdef/tests/overlnnum.exprc | 1 + contrib/unifdef/tests/overlnnum.sh | 6 + contrib/unifdef/tests/overperms.experr | 2 + contrib/unifdef/tests/overperms.expout | 16 + contrib/unifdef/tests/overperms.exprc | 1 + contrib/unifdef/tests/overperms.sh | 12 + contrib/unifdef/tests/overunchanged.experr | 0 contrib/unifdef/tests/overunchanged.expout | 0 contrib/unifdef/tests/overunchanged.exprc | 1 + contrib/unifdef/tests/overunchanged.sh | 8 + contrib/unifdef/tests/overwrite.experr | 0 contrib/unifdef/tests/overwrite.expout | 16 + contrib/unifdef/tests/overwrite.exprc | 1 + contrib/unifdef/tests/overwrite.sh | 6 + contrib/unifdef/tests/recursive.experr | 120 ++ contrib/unifdef/tests/recursive.expout | 26 + contrib/unifdef/tests/recursive.exprc | 1 + contrib/unifdef/tests/recursive.sh | 1 + contrib/unifdef/tests/small1.c | 17 + contrib/unifdef/tests/small1.experr | 0 contrib/unifdef/tests/small1.expout | 13 + contrib/unifdef/tests/small1.exprc | 1 + contrib/unifdef/tests/small1.sh | 1 + contrib/unifdef/tests/small2.c | 17 + contrib/unifdef/tests/small2.experr | 0 contrib/unifdef/tests/small2.expout | 13 + contrib/unifdef/tests/small2.exprc | 1 + contrib/unifdef/tests/small2.sh | 1 + contrib/unifdef/tests/spaces1.c | 17 + contrib/unifdef/tests/spaces1.experr | 0 contrib/unifdef/tests/spaces1.expout | 13 + contrib/unifdef/tests/spaces1.exprc | 1 + contrib/unifdef/tests/spaces1.sh | 1 + contrib/unifdef/tests/spaces2.c | 17 + contrib/unifdef/tests/spaces2.experr | 0 contrib/unifdef/tests/spaces2.expout | 13 + contrib/unifdef/tests/spaces2.exprc | 1 + contrib/unifdef/tests/spaces2.sh | 1 + contrib/unifdef/tests/spaces3.c | 17 + contrib/unifdef/tests/spaces3.experr | 0 contrib/unifdef/tests/spaces3.expout | 13 + contrib/unifdef/tests/spaces3.exprc | 1 + contrib/unifdef/tests/spaces3.sh | 1 + contrib/unifdef/tests/spaces4.c | 17 + contrib/unifdef/tests/spaces4.experr | 0 contrib/unifdef/tests/spaces4.expout | 13 + contrib/unifdef/tests/spaces4.exprc | 1 + contrib/unifdef/tests/spaces4.sh | 1 + contrib/unifdef/tests/whitespace-1.experr | 2 + contrib/unifdef/tests/whitespace-1.expout | 1 + contrib/unifdef/tests/whitespace-1.exprc | 1 + contrib/unifdef/tests/whitespace-1.sh | 1 + contrib/unifdef/tests/whitespace-2.experr | 0 contrib/unifdef/tests/whitespace-2.expout | 5 + contrib/unifdef/tests/whitespace-2.exprc | 1 + contrib/unifdef/tests/whitespace-2.sh | 1 + contrib/unifdef/tests/whitespace.c | 7 + contrib/unifdef/tests/xterm.experr | 3 + contrib/unifdef/tests/xterm.expout | 83 ++ contrib/unifdef/tests/xterm.exprc | 1 + contrib/unifdef/tests/xterm.sh | 35 + contrib/unifdef/unifdef.1 | 530 ++++++++ contrib/unifdef/unifdef.c | 1702 ++++++++++++++++++++++++ contrib/unifdef/unifdef.h | 53 + contrib/unifdef/unifdefall.sh | 58 + contrib/unifdef/version.h | 2 + contrib/unifdef/win32/Makefile.mingw | 14 + contrib/unifdef/win32/unifdef.h | 84 ++ contrib/unifdef/win32/unifdef.sln | 20 + contrib/unifdef/win32/unifdef.vcxproj | 96 ++ contrib/unifdef/win32/win32.c | 91 ++ 442 files changed, 6575 insertions(+) diff --git a/contrib/unifdef/.gitignore b/contrib/unifdef/.gitignore new file mode 100644 index 000000000000..55ca2f341b7c --- /dev/null +++ b/contrib/unifdef/.gitignore @@ -0,0 +1,7 @@ +Changelog +unifdef +unifdef.exe +unifdef.txt +unifdef-* +version.h +version.sh diff --git a/contrib/unifdef/.travis.yml b/contrib/unifdef/.travis.yml new file mode 100644 index 000000000000..39aa4292de14 --- /dev/null +++ b/contrib/unifdef/.travis.yml @@ -0,0 +1,59 @@ +language: c + +sudo: false + +os: + - linux + - osx + +compiler: + - gcc + - clang + +matrix: + include: + ## Ubuntu 14.04 Trusty (beta), sudo required! + - os: linux + dist: trusty + sudo: required + compiler: gcc + env: TRUSTY="yes" + - os: linux + dist: trusty + sudo: required + compiler: clang + env: TRUSTY="yes" + ## MinGW / wine + - os: linux + sudo: required + compiler: i586-mingw32msvc-gcc + env: BUILD_MINGW="yes" + allow_failures: + - compiler: i586-mingw32msvc-gcc + +install: + - env | grep -v "encrypted" | LC_ALL=C sort + - if test "${BUILD_MINGW}" = "yes"; then + sudo apt-get -qq update && + sudo apt-get -qq install wine; + fi + +script: + - if test "${BUILD_MINGW}" != "yes"; then + make && + make test && + make release; + else + export CC=i586-mingw32msvc-gcc; + echo -e '#!/bin/bash\nexec wine $0.exe "$@"' > unifdef; + chmod ugo+x unifdef; + make version.h && + make -f win32/Makefile.mingw test; + fi + +branches: + only: + - master + - next + - /^travis.*/ + - /^tmp.*/ diff --git a/contrib/unifdef/COPYING b/contrib/unifdef/COPYING new file mode 100644 index 000000000000..ae0ab7eeb717 --- /dev/null +++ b/contrib/unifdef/COPYING @@ -0,0 +1,85 @@ +unifdef copyright licence +------------------------- + +All files in this package are distributed under the two-clause BSD +copyright licence, except for the manual page unifdef.1 and the +portability support code in the FreeBSD subdirectory, which all have +a three-clause BSD copyright licence. + +Unifdef was derived from software contributed to Berkeley by Dave +Yost. It was rewritten to support ANSI C by Tony Finch. The original +version of unifdef.c carried the four-clause BSD copyright licence. +None of its code remains in this version (though some of the names +remain) so it now carries the more liberal two-clause licence. + +Unless otherwise stated, the files in this package are: + + Copyright (c) 2002 - 2020 Tony Finch + +unifdefall.sh is: + + Copyright (c) 2002 - 2013 Tony Finch + Copyright (c) 2009 - 2010 Jonathan Nieder + +Some files in the tests directory are: + + Copyright 2004, 2008 Bob Proulx + +The two-clause BSD copyright licence applying to all the above files is: + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +The three-clause BSD copyright licence for the manual page unifdef.1 +and the portability support code from FreeBSD is below. The fourth +advertising clause that used to appear between clauses 2 and 3 was +rescinded by the University of California Berkeley in 1999. +ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change + + Copyright (c) 1985 - 1994 + The Regents of the University of California. All rights reserved. + Copyright (c) 2002 - 2012 Tony Finch . All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +- end - diff --git a/contrib/unifdef/FreeBSD/err.c b/contrib/unifdef/FreeBSD/err.c new file mode 100644 index 000000000000..9589fced5b26 --- /dev/null +++ b/contrib/unifdef/FreeBSD/err.c @@ -0,0 +1,138 @@ +/*- + * Copyright (c) 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "unifdef.h" + +void +err(int eval, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + verrc(eval, errno, fmt, ap); + va_end(ap); +} + +void +verr(int eval, const char *fmt, va_list ap) +{ + verrc(eval, errno, fmt, ap); +} + +void +errc(int eval, int code, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + verrc(eval, code, fmt, ap); + va_end(ap); +} + +void +verrc(int eval, int code, const char *fmt, va_list ap) +{ + fprintf(stderr, "%s: ", _getprogname()); + if (fmt != NULL) { + vfprintf(stderr, fmt, ap); + fprintf(stderr, ": "); + } + fprintf(stderr, "%s\n", strerror(code)); + exit(eval); +} + +void +errx(int eval, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + verrx(eval, fmt, ap); + va_end(ap); +} + +void +verrx(int eval, const char *fmt, va_list ap) +{ + fprintf(stderr, "%s: ", _getprogname()); + if (fmt != NULL) + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + exit(eval); +} + +void +warn(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + vwarnc(errno, fmt, ap); + va_end(ap); +} + +void +vwarn(const char *fmt, va_list ap) +{ + vwarnc(errno, fmt, ap); +} + +void +warnc(int code, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + vwarnc(code, fmt, ap); + va_end(ap); +} + +void +vwarnc(int code, const char *fmt, va_list ap) +{ + fprintf(stderr, "%s: ", _getprogname()); + if (fmt != NULL) { + vfprintf(stderr, fmt, ap); + fprintf(stderr, ": "); + } + fprintf(stderr, "%s\n", strerror(code)); +} + +void +warnx(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + vwarnx(fmt, ap); + va_end(ap); +} + +void +vwarnx(const char *fmt, va_list ap) +{ + fprintf(stderr, "%s: ", _getprogname()); + if (fmt != NULL) + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); +} diff --git a/contrib/unifdef/FreeBSD/getopt.c b/contrib/unifdef/FreeBSD/getopt.c new file mode 100644 index 000000000000..eb9b0c507875 --- /dev/null +++ b/contrib/unifdef/FreeBSD/getopt.c @@ -0,0 +1,118 @@ +/* + * Copyright (c) 1987, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "unifdef.h" + +int opterr = 1, /* if error message should be printed */ + optind = 1, /* index into parent argv vector */ + optopt, /* character checked for validity */ + optreset; /* reset getopt */ +char *optarg; /* argument associated with option */ + +#define BADCH (int)'?' +#define BADARG (int)':' + +static char EMSG[] = ""; + +/* + * getopt -- + * Parse argc/argv argument vector. + */ +int +getopt(int nargc, char *nargv[], const char *ostr) +{ + static char *place = EMSG; /* option letter processing */ + const char *oli; /* option letter list index */ + + if (optreset || *place == 0) { /* update scanning pointer */ + optreset = 0; + place = nargv[optind]; + if (optind >= nargc || *place++ != '-') { + /* Argument is absent or is not an option */ + place = EMSG; + return (-1); + } + optopt = *place++; + if (optopt == '-' && *place == 0) { + /* "--" => end of options */ + ++optind; + place = EMSG; + return (-1); + } + if (optopt == 0) { + /* Solitary '-', treat as a '-' option + if the program (eg su) is looking for it. */ + place = EMSG; + if (strchr(ostr, '-') == NULL) + return (-1); + optopt = '-'; + } + } else + optopt = *place++; + + /* See if option letter is one the caller wanted... */ + if (optopt == ':' || (oli = strchr(ostr, optopt)) == NULL) { + if (*place == 0) + ++optind; + if (opterr && *ostr != ':') + (void)fprintf(stderr, + "%s: illegal option -- %c\n", _getprogname(), + optopt); + return (BADCH); + } + + /* Does this option need an argument? */ + if (oli[1] != ':') { + /* don't need argument */ + optarg = NULL; + if (*place == 0) + ++optind; + } else { + /* Option-argument is either the rest of this argument or the + entire next argument. */ + if (*place) + optarg = place; + else if (nargc > ++optind) + optarg = nargv[optind]; + else { + /* option-argument absent */ + place = EMSG; + if (*ostr == ':') + return (BADARG); + if (opterr) + (void)fprintf(stderr, + "%s: option requires an argument -- %c\n", + _getprogname(), optopt); + return (BADCH); + } + place = EMSG; + ++optind; + } + return (optopt); /* return option letter */ +} diff --git a/contrib/unifdef/INSTALL b/contrib/unifdef/INSTALL new file mode 100644 index 000000000000..03d7488588ab --- /dev/null +++ b/contrib/unifdef/INSTALL @@ -0,0 +1,36 @@ +unifdef installation instructions +--------------------------------- + +Dependencies: + * unifdef is mostly ANSI C, with a few unixisms + * unifdefall is a Unix shell script + * the manual uses the nroff mdoc macros + * the support and test scripts are Unix shell scripts + +To build on Unix, type `make`. You can adjust the compilation options +using the POSIX standard CFLAGS and LDFLAGS make variables. + +To install in your home directory, type `make install` +or to install in /usr type `make prefix=/usr install`. +See the start of the Makefile for the install location +variables. + +The win32 subdirectory contains build files for MinGW and Visual +Studio 2010 which make use of the FreeBSD code plus some other +portability wrappers. + +To build with MinGW, type `mingw32-make -f win32/Makefile.mingw`. + +Unlike the Unix Makefile, the Windows builds do not automatically +create or update version.h. The release tar and zip files include a +pre-generated version.h but the git repository does not. To build from +a git clone you need a Unix shell environment, which you can get as +part of GitHub for Windows - http://windows.github.com/ +To update version.h, right-click on the fanf2/unifdef repository and +select "open a shell here", then type `sh scripts\reversion.sh`. + +We assume Unix provides the BSD err.h functions and C99 stdbool.h. The +FreeBSD subdirectory has copies of err.c and getopt.c for systems such +as Windows that don't have them built in. + +- end - diff --git a/contrib/unifdef/Makefile b/contrib/unifdef/Makefile new file mode 100644 index 000000000000..36c70283c1b7 --- /dev/null +++ b/contrib/unifdef/Makefile @@ -0,0 +1,58 @@ +# Makefile for unifdef + +prefix = ${HOME} +bindir = ${prefix}/bin +mandir = ${prefix}/share/man +man1dir= ${mandir}/man1 + +bindest= ${DESTDIR}${bindir} +man1dest= ${DESTDIR}${man1dir} + +all: unifdef + +unifdef: unifdef.c unifdef.h version.h + ${CC} ${CFLAGS} ${LDFLAGS} -o unifdef unifdef.c + +version.h: version.sh +version.sh:: + scripts/reversion.sh + +test: unifdef + scripts/runtests.sh tests + +install: unifdef unifdefall.sh unifdef.1 + : commands + install -m 755 -d ${bindest} + install -m 755 unifdef ${bindest}/ + install -m 755 unifdefall.sh ${bindest}/unifdefall + : manual + install -m 755 -d ${man1dest} + install -m 644 unifdef.1 ${man1dest}/ + ln -s unifdef.1 ${man1dest}/unifdefall.1 + *** 8448 LINES SKIPPED ***