From bc7e64195e3c5a1bc9332eb71cdb3ddc31aac9c6 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Sat, 30 Jun 2018 18:57:17 -0600 Subject: [PATCH] tt/mini_isam: use proper include, get rid of ultrix strdup --- cde/lib/tt/mini_isam/isalloc.c | 8 +----- cde/lib/tt/mini_isam/strdup.ultrix.c | 41 ---------------------------- 2 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 cde/lib/tt/mini_isam/strdup.ultrix.c diff --git a/cde/lib/tt/mini_isam/isalloc.c b/cde/lib/tt/mini_isam/isalloc.c index 6af56013..7ffcfdb9 100644 --- a/cde/lib/tt/mini_isam/isalloc.c +++ b/cde/lib/tt/mini_isam/isalloc.c @@ -42,13 +42,7 @@ static char sccsid[] = "@(#)isalloc.c 1.3 89/07/17 Copyr 1988 Sun Micro"; #include "isam_impl.h" #include - -/* strdup is not defined in Ultrix' string.h, so it is implemented in a separate - * file named strdup.ultrix.c - */ -#ifdef __ultrix__ -extern char *strdup(); -#endif +#include /* * _ismalloc(nbytes) diff --git a/cde/lib/tt/mini_isam/strdup.ultrix.c b/cde/lib/tt/mini_isam/strdup.ultrix.c deleted file mode 100644 index 934fe9c2..00000000 --- a/cde/lib/tt/mini_isam/strdup.ultrix.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ -/*%% (c) Copyright 1993, 1994 Hewlett-Packard Company */ -/*%% (c) Copyright 1993, 1994 International Business Machines Corp. */ -/*%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. */ -/*%% (c) Copyright 1993, 1994 Novell, Inc. */ -/*%% $XConsortium: strdup.ultrix.c /main/3 1995/10/23 11:46:57 rswiston $ */ -/* strdup - make duplicate of string s */ -#include -#include - -char * -strdup(char *s) -{ - char *p; - - p = (char *)malloc(strlen(s) + 1); /* + 1 for '\0' character */ - if (p != NULL) - strcpy(p,s); - return p; -} -- 2.25.1