Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/heimdal/dist/lib/asn1 handle our basename.
details: https://anonhg.NetBSD.org/src/rev/272b2cd08dab
branches: trunk
changeset: 350976:272b2cd08dab
user: christos <christos%NetBSD.org@localhost>
date: Sun Jan 29 01:46:37 2017 +0000
description:
handle our basename.
diffstat:
crypto/external/bsd/heimdal/dist/lib/asn1/gen.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diffs (63 lines):
diff -r 82f3cc9a3d5b -r 272b2cd08dab crypto/external/bsd/heimdal/dist/lib/asn1/gen.c
--- a/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c Sun Jan 29 01:46:16 2017 +0000
+++ b/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c Sun Jan 29 01:46:37 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gen.c,v 1.4 2017/01/28 21:31:45 christos Exp $ */
+/* $NetBSD: gen.c,v 1.5 2017/01/29 01:46:37 christos Exp $ */
/*
* Copyright (c) 1997 - 2005 Kungliga Tekniska Högskolan
@@ -38,7 +38,7 @@
#include "gen_locl.h"
#include <libgen.h>
-__RCSID("$NetBSD: gen.c,v 1.4 2017/01/28 21:31:45 christos Exp $");
+__RCSID("$NetBSD: gen.c,v 1.5 2017/01/29 01:46:37 christos Exp $");
FILE *privheaderfile, *headerfile, *codefile, *logfile, *templatefile;
@@ -153,10 +153,12 @@
/* template file */
if (asprintf(&template, "%s-template.x", headerbase) < 0 || template == NULL)
errx(1, "malloc");
+ char *copy = estrdup(filename);
+ char *bn = basename(copy);
fprintf (headerfile,
"/* Generated from %s */\n"
"/* Do not edit */\n\n",
- basename(filename));
+ bn);
fprintf (headerfile,
"#ifndef __%s_h__\n"
"#define __%s_h__\n\n", headerbase, headerbase);
@@ -273,8 +275,9 @@
"#include <errno.h>\n"
"#include <limits.h>\n"
"#include <krb5/%s.h>\n",
- basename(filename),
+ bn,
type_file_string);
+ free(copy);
fprintf (templatefile,
"#include <%s>\n"
@@ -364,6 +367,8 @@
fprintf(logfile, "%s ", filename);
free(filename);
filename = NULL;
+ char *copy = estrdup(orig_filename);
+ char *bn = basename(copy);
fprintf (codefile,
"/* Generated from %s */\n"
"/* Do not edit */\n\n"
@@ -375,8 +380,9 @@
"#include <errno.h>\n"
"#include <limits.h>\n"
"#include <krb5/%s>\n",
- basename(orig_filename),
+ bn,
type_file_string);
+ free(copy);
fprintf (codefile,
"#include \"%s\"\n"
Home |
Main Index |
Thread Index |
Old Index