From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3806 invoked from network); 28 Feb 2022 01:07:13 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 28 Feb 2022 01:07:13 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 34DB79CFD2; Mon, 28 Feb 2022 11:07:09 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 67A159CBCF; Mon, 28 Feb 2022 11:05:19 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=dartmouth.edu header.i=@dartmouth.edu header.b="sa0vcVo8"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id AD00D9CBCF; Mon, 28 Feb 2022 11:05:15 +1000 (AEST) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by minnie.tuhs.org (Postfix) with ESMTPS id 497D99CBCE for ; Mon, 28 Feb 2022 11:05:14 +1000 (AEST) Received: by mail-wr1-f46.google.com with SMTP id p9so12922484wra.12 for ; Sun, 27 Feb 2022 17:05:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dartmouth.edu; s=google1; h=mime-version:from:date:message-id:subject:to; bh=SA1fvZoExGEqKFpkT48/28z48/PHD0aScPvKVGWO6V0=; b=sa0vcVo82lQE6k7PA77p3kCqbpA+nwBAWK/hmRjaAhSlWFGKVsmOwwPthwbkgQDIO0 2mXG+Zthd2lDY5pFYb+/0uvZ8opPLpTa6n1Y+gVoXJXZYoarSqhE6fOrl8Mnz2kAkgmD 8oZ2Ds7THlzvv11Dy+gfUJTjwPQkHJnNpiejqXKvQWBd1WhaVse0APtgNPUTulVSZGPV gno3G6F8Ypjx+SFibtidOyw8/S9NTMKE9Y9rNX7CLgK9otaFBsEVIvh4YYTLDgkSY6HW FA16+4YdTlIN0slfKXq4Eu8H5nOcLsDiNFyHaRVSQLXLcTvYRg2yirYf2tFeU2+A4rNb Dvug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=SA1fvZoExGEqKFpkT48/28z48/PHD0aScPvKVGWO6V0=; b=vbjDPeA3pY/Uoy4K31g3IeReO/19MvOhbjNlZsELv73iMHTyRZ0XMiTZWj/tBY2zRw 1pJ9RzRgNZkNseu7BpCORauM1e2796XNL0beDx8C3BCdk0QwhhxxFETSYiLF+P0JxhEJ gCbWKtdytiZFDItTolh1Y8mwgKNs8W4ciK73v6u1k8+GMUZZlDdYHGwUSKVd9dUi4g6U HVIrwmoPNczryHqJ/jLUGuvf2Xgef+XwaqA3KbOe4IdTMqj3Lc7icuqJK+rKbU0EguF1 jQsLRnmZ5lUvPDZtiir+YwvGFdM7TOwcHuA2JwaFO76RfHZdtkIPHleIKzRByTPHzQHp k2/w== X-Gm-Message-State: AOAM531AHWr6aOXyjW4Ny8V4/VFqiey4HIjj4HrNLyveIgJyqHVrqnJT y9O0cTjD7GvzIzB48ChcOr1pQJ8JE3tCwpGN0pWDgBnoTMovWg== X-Google-Smtp-Source: ABdhPJysylIE7iTuZvGDnILtUjL5U1pMarmLfD5GegAyGk60s7NEEfkazlKJEk+LIwFDEAmyqAMctXjp89CyTOKgWNE= X-Received: by 2002:adf:d1e9:0:b0:1ea:7d0f:69c7 with SMTP id g9-20020adfd1e9000000b001ea7d0f69c7mr14353799wrd.373.1646010312264; Sun, 27 Feb 2022 17:05:12 -0800 (PST) MIME-Version: 1.0 From: Douglas McIlroy Date: Sun, 27 Feb 2022 20:04:55 -0500 Message-ID: To: TUHS main list Content-Type: text/plain; charset="UTF-8" Subject: Re: [TUHS] run commands at login in v6 and stty X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" > The X11 tree was a heavily ifdef-ed. And it needed to be, I don't have > an answer as to how you would reuse all that code on different hardware > in a better way. Plan 9 did it with #include. The name of the included file was the same for every architecture. Only the search path for include files changed. Done with care, this eliminates the typical upfront #ifdefs.that define constants and set flags. Other preprocessor conditionals can usually be replaced by a regular if, letting the compiler optimize away the unwanted alternative. This makes conditionals obey the scope rules of C. Doug