Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Aki Atoji
Sun, 06 Sep 1992 17:52
binutils-2.0
Author: Aki Atoji
Date: Sun, 06 Sep 1992 17:52
Date: Sun, 06 Sep 1992 17:52
60 lines
2973 bytes
2973 bytes
Older SYSV R3 machines do not have rename() call, causing linking of
binutils/ar to abort with an unresolved error.
The following is a patch to libiberty/functions.def and a trivial new file
libiberty/rename.c to solve the above problem.
Host system: ISC 2.0.2 (any stock SVR3)
Binutils-2.0 configured with: configure i386v
Binutils-2.0 built with: make CC="gcc" CFLAGS="-O2 -g"
==============================================================================
*** functions.def~ Sun Sep 6 10:18:44 1992
--- functions.def Sun Sep 6 10:13:35 1992
***************
*** 24,29 ****
--- 24,30 ----
DEF(memmove, PTR, (s1, s2, length), PTR s1 AND CONST PTR s2 AND size_t length)
DEF(memset, PTR, (s, val, length), PTR s AND int val AND size_t length )
DEF(random, long int, (), NOTHING)
+ DEF(rename, int, (from, to), CONST char *from AND CONST char *to)
DEF(rindex, char*, (s, c), char *s AND int c)
DEF(strchr, char*, (s, c), CONST char *s AND int c)
DEF(strdup, char*, (s1), char * s1)
=================================rename.c=====================================
/*
* emulate rename() on AKOS realtime kernel.
* rename.c Copyright (C) 1992, Aki Atoji aki@akix.uucp
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
int rename (const char *from, const char *to)
{
int result;
return (result = link(from, to)) ? result : unlink(from);
}
===========================================================================
---------------------------------------------------------------------------
Aki Atoji Graphics, Networking, Embedded Realtime and Japanese Consulting
aki@akix.uucp crash!akix!aki@trout.nosc.mil
"What Vegemite is to Australians, what Natto is to Japanese. Now, don't
even ask about this Peanut Butter and Jelley stuff." -- Aki
---------------------------------------------------------------------------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads