/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1992-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Glenn Fowler <[email protected]> *17* David Korn <[email protected]> *18* *19***********************************************************************/20#pragma prototyped21/*22* -lcmd specific workaround to handle23* fts_namelen24* fts_pathlen25* fts_level26* changing from [unsigned] short bit to [s]size_t27*28* ksh (or any other main application) that pulls in -lcmd29* at runtime may result in old -last running with new -lcmd30* which is not a good situation (tm)31*32* probably safe to drop after 2015010133*/3435#include <ast.h>36#include <fts_fix.h>3738#undef fts_read3940FTSENT*41_fts_read(FTS* fts)42{43FTSENT* oe;4445static FTSENT* ne;4647if ((oe = _ast_fts_read(fts)) && ast.version < 20100102L && (ne || (ne = newof(0, FTSENT, 1, 0))))48{49*ne = *oe;50oe = ne;51ne->fts_namelen = ne->_fts_namelen;52ne->fts_pathlen = ne->_fts_pathlen;53ne->fts_level = ne->_fts_level;54}55return oe;56}575859