title: cc -switch (or other "automatic" mechanism) to keep functions static within modules
body: <p>I have two formerly stand-alone modules, say <strong>this.c</strong> and <strong>that.c</strong>, that I now want to compile together as <strong>cc this.c that.c -o whatever</strong> &nbsp; Don't worry about just one <strong>main()</strong>, etc; that's all been taken care of, and everything would work okay except for the following...</p>
  
  <p>Each module contains several dozen (maybe in all 50) "duplicate" functions; same names but slightly different behaviors. And I never bothered declaring them static. I started editing in that keyword, which would be lengthy-but-doable by itself. Unfortunately, I've also declared each function in every other function that calls it, so I have to edit both every function's entry point itself, as well as every function that calls any other functions. So now that's a cumbersome mess.</p>
  
  <p>And please don't admonish me that the modules are too big, blah, blah, blah. Yeah, it's a mess of my own making. But my time machine's in the shop, so there's no use belaboring that point.</p>
  
  <p>What I'd like to find (but can't) is some <strong>cc -switch</strong> that says something to the effect, <strong>-automatically-treat-all-functions-static-in-their-own-modules</strong> Or something like that. So, <strong>Question:</strong> is there any way to accomplish this without exhaustively editing pretty much everything everywhere?</p>
  
  <p>(P.S. Other kinds of solutions do work, e.g., I can compile them separately and have the "main" one popen() the other one and read its output. But that makes for a cumbersome user-installation-experience which I'd like to avoid. So compiling them together is the only solution I can think of that keeps all the "internals" internal.)</p>