Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpfcso!mjs From: mjs@hpfcso.HP.COM (Marc Sabatella) Newsgroups: comp.sys.hp Subject: Re: how to get longer file names? Message-ID: <7370265@hpfcso.HP.COM> Date: 10 Dec 90 18:33:04 GMT References: <1720012@hpbbi4.BBN.HP.COM> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 37 >Also, if you're in the business of creating libs, be warned >that ar will NOT correctly archive files that have 15+ char filenames. >HP knows this, so maybe there's a patch. Else you wait for 8.0. This is part of the design of the portable ar(1) format, I'm afraid. Domain supports long filenames in a non-standard way (ie, Domain archives with long filenames are not completely portable to other systems), but no other available Un*x's I'm aware of (not SunOS, BSD, or SVR3) can handle long filenames in an ar(1) archive. SVR4 has support for this, however, and we expect that other vendors will adopt this support soon. We hope to incorporate it in a future release. Different vendors react to long filenames in different ways. HP-UX looks at the full filename for comparisons and then truncates for storage, so if for example you try to replace "thisisalongfilename", your filename will not match the truncated version in the library. Your file will be inserted into the archive with its name truncated (thus there will be two versions of your file in the archive). The alternative would have been to overwrite any file with a similar name, but then you might accidentally overwrite "thisisalongfilename1" with "thisisalongfilename2", losing the original file. With the current behavior, if your filename is longer than 14 characters, either delete the original file from the archive before inserting the new version, or temporarily rename the new file to truncated name before replacing it. Note if you do have files that are not unique in the first 14 characters, HP's ar(1) will indeed let you keep them both in the same archive, and ld(1) can handle that. They will show up with the same truncated name in the table of contents, however, and replacing, extracting or deleting one of them can be tricky. We feel this is better than the alternatives of not allowing similar filenames to coexist, or having a non-portable format. -------------- Marc Sabatella (marc@hpmonk.fc.hp.com) Disclaimers: 2 + 2 = 3, for suitably small values of 2 Bill and Dave may not always agree with me