=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/dir.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** src/usr.bin/make/dir.c 1996/06/26 05:36:29 1.4 --- src/usr.bin/make/dir.c 1996/09/02 16:04:09 1.5 *************** *** 1,5 **** ! /* $OpenBSD: dir.c,v 1.4 1996/06/26 05:36:29 deraadt Exp $ */ ! /* $NetBSD: dir.c,v 1.10 1996/02/04 22:20:38 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. --- 1,5 ---- ! /* $OpenBSD: dir.c,v 1.5 1996/09/02 16:04:09 briggs Exp $ */ ! /* $NetBSD: dir.c,v 1.11 1996/08/13 16:42:02 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. *************** *** 43,49 **** #if 0 static char sccsid[] = "@(#)dir.c 5.6 (Berkeley) 12/28/90"; #else ! static char rcsid[] = "$OpenBSD: dir.c,v 1.4 1996/06/26 05:36:29 deraadt Exp $"; #endif #endif /* not lint */ --- 43,49 ---- #if 0 static char sccsid[] = "@(#)dir.c 5.6 (Berkeley) 12/28/90"; #else ! static char rcsid[] = "$OpenBSD: dir.c,v 1.5 1996/09/02 16:04:09 briggs Exp $"; #endif #endif /* not lint */ *************** *** 355,361 **** (pattern[0] == '.'))) { (void)Lst_AtEnd(expansions, ! (isDot ? strdup(entry->name) : str_concat(p->name, entry->name, STR_ADDSLASH))); } --- 355,361 ---- (pattern[0] == '.'))) { (void)Lst_AtEnd(expansions, ! (isDot ? estrdup(entry->name) : str_concat(p->name, entry->name, STR_ADDSLASH))); } *************** *** 707,713 **** } hits += 1; dot->hits += 1; ! return (strdup (name)); } if (Lst_Open (path) == FAILURE) { --- 707,713 ---- } hits += 1; dot->hits += 1; ! return (estrdup (name)); } if (Lst_Open (path) == FAILURE) { *************** *** 818,824 **** /* * Checking in dot -- DON'T put a leading ./ on the thing. */ ! file = strdup(name); checkedDot = TRUE; } if (DEBUG(DIR)) { --- 818,824 ---- /* * Checking in dot -- DON'T put a leading ./ on the thing. */ ! file = estrdup(name); checkedDot = TRUE; } if (DEBUG(DIR)) { *************** *** 914,920 **** } if (Hash_FindEntry (&p->files, cp) != (Hash_Entry *)NULL) { ! return (strdup (name)); } else { return ((char *) NULL); } --- 914,920 ---- } if (Hash_FindEntry (&p->files, cp) != (Hash_Entry *)NULL) { ! return (estrdup (name)); } else { return ((char *) NULL); } *************** *** 929,935 **** if (DEBUG(DIR)) { printf("got it (in mtime cache)\n"); } ! return(strdup(name)); } else if (stat (name, &stb) == 0) { entry = Hash_CreateEntry(&mtimes, name, (Boolean *)NULL); if (DEBUG(DIR)) { --- 929,935 ---- if (DEBUG(DIR)) { printf("got it (in mtime cache)\n"); } ! return(estrdup(name)); } else if (stat (name, &stb) == 0) { entry = Hash_CreateEntry(&mtimes, name, (Boolean *)NULL); if (DEBUG(DIR)) { *************** *** 937,943 **** name); } Hash_SetValue(entry, (long)stb.st_mtime); ! return (strdup (name)); } else { if (DEBUG(DIR)) { printf("failed. Returning NULL\n"); --- 937,943 ---- name); } Hash_SetValue(entry, (long)stb.st_mtime); ! return (estrdup (name)); } else { if (DEBUG(DIR)) { printf("failed. Returning NULL\n"); *************** *** 980,986 **** } if (fullName == (char *)NULL) { ! fullName = strdup(gn->name); } entry = Hash_FindEntry(&mtimes, fullName); --- 980,986 ---- } if (fullName == (char *)NULL) { ! fullName = estrdup(gn->name); } entry = Hash_FindEntry(&mtimes, fullName); *************** *** 1054,1060 **** if ((d = opendir (name)) != (DIR *) NULL) { p = (Path *) emalloc (sizeof (Path)); ! p->name = strdup (name); p->hits = 0; p->refCount = 1; Hash_InitTable (&p->files, -1); --- 1054,1060 ---- if ((d = opendir (name)) != (DIR *) NULL) { p = (Path *) emalloc (sizeof (Path)); ! p->name = estrdup (name); p->hits = 0; p->refCount = 1; Hash_InitTable (&p->files, -1); *************** *** 1138,1144 **** LstNode ln; /* the node of the current directory */ Path *p; /* the structure describing the current directory */ ! str = strdup (""); if (Lst_Open (path) == SUCCESS) { while ((ln = Lst_Next (path)) != NILLNODE) { --- 1138,1144 ---- LstNode ln; /* the node of the current directory */ Path *p; /* the structure describing the current directory */ ! str = estrdup (""); if (Lst_Open (path) == SUCCESS) { while ((ln = Lst_Next (path)) != NILLNODE) {