Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.wizards Subject: Re: Unnecessary globals in libraries. Message-ID: <8640@smoke.ARPA> Date: 5 Oct 88 06:05:28 GMT References: Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 15 In article ljz%fxgrp.fx.com@ames.arc.nasa.gov (Lloyd Zusman) writes: >Is there any way in BSD systems and SYSV systems for me to build my >library with the three object files as defined above and still cause >the common[1-3] routines to be unknown to the users of the library? Not unless your linker supports some form of global symbol mapping. The usual solution is to either use names starting with at least one underscore (e.g. mine might be _DAG_whatever), since no sane application will define its own externs with names like that, or to use some common prefix for all the "internal" names in your library (e.g. mine might be DAGwhatever) and warn your customers about this reservation of a portion of name space for your library. Old CDC Fortran compilers used to use names like Q8Qxxx for library functions, and few users had a problem with it.