/netbsd-src/external/bsd/pkg_install/dist/lib/ |
H A D | var.c | 193 char *tmpname; in var_set() local 215 tmpname = xasprintf("%s.XXXXXX", fname); in var_set() 216 if ((fd = mkstemp(tmpname)) < 0) { in var_set() 217 free(tmpname); in var_set() 224 if (chmod(tmpname, 0644) < 0) { in var_set() 228 free(tmpname); in var_set() 235 remove(tmpname); in var_set() 236 free(tmpname); in var_set() 264 free(tmpname); in var_set() 269 if (stat(tmpname, &st) < 0) { in var_set() [all …]
|
/netbsd-src/external/bsd/am-utils/dist/conf/mtab/ |
H A D | mtab_file.c | 249 char tmpname[64]; in rewrite_mtab() local 258 memmove(tmpname, mcp, cp - mcp); in rewrite_mtab() 259 tmpname[cp - mcp] = '\0'; in rewrite_mtab() 262 tmpname[0] = '.'; in rewrite_mtab() 263 tmpname[1] = '\0'; in rewrite_mtab() 265 xstrlcat(tmpname, "/mtabXXXXXX", sizeof(tmpname)); in rewrite_mtab() 269 tmpfd = mkstemp(tmpname); in rewrite_mtab() 272 mktemp(tmpname); in rewrite_mtab() 273 tmpfd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC, 0644); in rewrite_mtab() 280 plog(XLOG_ERROR, "%s: open: %m", tmpname); in rewrite_mtab() [all …]
|
H A D | mtab_mach3.c | 314 char tmpname[64]; in rewrite_mtab() local 322 memmove(tmpname, mcp, cp - mcp); in rewrite_mtab() 323 tmpname[cp - mcp] = '\0'; in rewrite_mtab() 326 tmpname[0] = '.'; in rewrite_mtab() 327 tmpname[1] = '\0'; in rewrite_mtab() 329 xstrlcat(tmpname, "/mtabXXXXXX", sizeof(tmpname)); in rewrite_mtab() 333 tmpfd = mkstemp(tmpname); in rewrite_mtab() 336 mktemp(tmpname); in rewrite_mtab() 337 tmpfd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC, 0644); in rewrite_mtab() 344 plog(XLOG_ERROR, "%s: open: %m", tmpname); in rewrite_mtab() [all …]
|
H A D | mtab_linux.c | 344 char tmpname[64]; in rewrite_mtab() local 361 memmove(tmpname, mcp, cp - mcp); in rewrite_mtab() 362 tmpname[cp - mcp] = '\0'; in rewrite_mtab() 365 tmpname[0] = '.'; in rewrite_mtab() 366 tmpname[1] = '\0'; in rewrite_mtab() 368 xstrlcat(tmpname, "/mtabXXXXXX", sizeof(tmpname)); in rewrite_mtab() 372 tmpfd = mkstemp(tmpname); in rewrite_mtab() 375 mktemp(tmpname); in rewrite_mtab() 376 tmpfd = open(tmpname, O_RDWR | O_CREAT | O_TRUNC, 0644); in rewrite_mtab() 383 plog(XLOG_ERROR, "%s: open: %m", tmpname); in rewrite_mtab() [all …]
|
/netbsd-src/external/gpl3/binutils.old/dist/binutils/ |
H A D | bucomm.c | 498 char *tmpname; in template_in_dir() local 516 tmpname = (char *) xmalloc (len + sizeof (template) + 2); in template_in_dir() 517 memcpy (tmpname, path, len); in template_in_dir() 523 if (len == 2 && tmpname[1] == ':') in template_in_dir() 524 tmpname[len++] = '.'; in template_in_dir() 526 tmpname[len++] = '/'; in template_in_dir() 530 tmpname = (char *) xmalloc (sizeof (template)); in template_in_dir() 534 memcpy (tmpname + len, template, sizeof (template)); in template_in_dir() 535 return tmpname; in template_in_dir() 545 char *tmpname = template_in_dir (filename); in make_tempname() local [all …]
|
/netbsd-src/external/gpl3/binutils/dist/binutils/ |
H A D | bucomm.c | 496 char *tmpname; in template_in_dir() local 514 tmpname = (char *) xmalloc (len + sizeof (template) + 2); in template_in_dir() 515 memcpy (tmpname, path, len); in template_in_dir() 521 if (len == 2 && tmpname[1] == ':') in template_in_dir() 522 tmpname[len++] = '.'; in template_in_dir() 524 tmpname[len++] = '/'; in template_in_dir() 528 tmpname = (char *) xmalloc (sizeof (template)); in template_in_dir() 532 memcpy (tmpname + len, template, sizeof (template)); in template_in_dir() 533 return tmpname; in template_in_dir() 543 char *tmpname = template_in_dir (filename); in make_tempname() local [all …]
|
/netbsd-src/external/gpl2/dtc/dist/ |
H A D | fstree.c | 27 char *tmpname; in read_fstree() local 33 tmpname = join_path(dirname, de->d_name); in read_fstree() 35 if (lstat(tmpname, &st) < 0) in read_fstree() 36 die("stat(%s): %s\n", tmpname, strerror(errno)); in read_fstree() 42 pfile = fopen(tmpname, "rb"); in read_fstree() 46 tmpname, strerror(errno)); in read_fstree() 58 newchild = read_fstree(tmpname); in read_fstree() 63 free(tmpname); in read_fstree()
|
/netbsd-src/usr.bin/rwall/ |
H A D | rwall.c | 162 char tmpname[MAXPATHLEN], lbuf[BUFSIZ], hostname[MAXHOSTNAMELEN + 1]; in makemsg() local 164 (void)snprintf(tmpname, sizeof(tmpname), "%s/wall.XXXXXX", _PATH_TMP); in makemsg() 165 if ((fd = mkstemp(tmpname)) == -1 || (fp = fdopen(fd, "r+")) == NULL) in makemsg() 167 (void)unlink(tmpname); in makemsg()
|
/netbsd-src/share/examples/refuse/ian/ian/ |
H A D | ian.c | 65 char tmpname[BUFSIZ]; in getfile() local 103 (void) snprintf(tmpname, sizeof(tmpname), "%s/fetch.XXXXXX", cachedir); in getfile() 104 fd = mkstemp(tmpname); in getfile() 106 warnx("can't create output file `%s'", tmpname); in getfile() 119 virtdir_add(&ian, newurl, strlen(newurl), 'f', tmpname, strlen(tmpname)); in getfile()
|
/netbsd-src/external/cddl/osnet/dist/tools/ctf/cvt/ |
H A D | ctfconvert.c | 259 char *tmpname = mktmpname(infile, ".ctf"); in main() local 260 write_ctf(mstrtd, infile, tmpname, dynsym | keep_stabs); in main() 261 if (rename(tmpname, infile) != 0) in main() 262 terminate("Couldn't rename temp file %s", tmpname); in main() 263 free(tmpname); in main()
|
H A D | ctfmerge.c | 222 static char *tmpname = NULL; variable 679 if (tmpname != NULL && dounlink) in terminate_cleanup() 680 unlink(tmpname); in terminate_cleanup() 701 tmpname = mktmpname(destfile, ".ctf"); in copy_ctf_data() 702 write_ctf(srctd, destfile, tmpname, CTF_COMPRESS | CTF_SWAP_BYTES | keep_stabs); in copy_ctf_data() 703 if (rename(tmpname, destfile) != 0) { in copy_ctf_data() 704 terminate("Couldn't rename temp file %s to %s", tmpname, in copy_ctf_data() 707 free(tmpname); in copy_ctf_data() 1128 tmpname = mktmpname(outfile, ".ctf"); in main() 1129 write_ctf(savetd, outfile, tmpname, in main() [all …]
|
/netbsd-src/external/gpl2/diffutils/dist/src/ |
H A D | sdiff.c | 52 static char * volatile tmpname; variable 235 if (tmpname) in cleanup() 236 unlink (tmpname); in cleanup() 722 if (tmpname) in main() 724 unlink (tmpname); in main() 725 tmpname = 0; in main() 992 if (tmpname) in edit() 993 tmp = fopen (tmpname, "w"); in edit() 1002 perror_fatal (tmpname); in edit() 1058 + 1 + strlen (tmpname) + 1); in edit() [all …]
|
/netbsd-src/sys/arch/sparc/sparc/ |
H A D | autoconf.c | 684 char tmpname[8]; in bootpath_fake() local 697 snprintf(tmpname, sizeof(tmpname), "x%cc", cp[1]); in bootpath_fake() 698 BP_APPEND(bp, tmpname, -1, v0val[0], 0); in bootpath_fake() 700 snprintf(tmpname, sizeof(tmpname), "x%c", cp[1]); in bootpath_fake() 701 BP_APPEND(bp, tmpname, v0val[1], v0val[2], 0); in bootpath_fake() 711 snprintf(tmpname, sizeof(tmpname), "%c%c", cp[0], cp[1]); in bootpath_fake() 712 BP_APPEND(bp, tmpname, -1, 0, 0); in bootpath_fake() 760 snprintf(tmpname, sizeof(tmpname), in bootpath_fake() 762 BP_APPEND(bp, tmpname, target, lun, v0val[2]); in bootpath_fake() 806 char tmpname[8]; in bootpath_fake() local [all …]
|
/netbsd-src/usr.bin/wall/ |
H A D | wall.c | 229 char *p, tmpname[MAXPATHLEN], lbuf[100]; in makemsg() local 233 (void)snprintf(tmpname, sizeof tmpname, "%s/wall.XXXXXX", _PATH_TMP); in makemsg() 234 if ((fd = mkstemp(tmpname)) == -1) in makemsg() 236 (void)unlink(tmpname); in makemsg()
|
/netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/asn1/ |
H A D | asn_mime.c | 806 char *tmpname = NULL, *tmpval = NULL, *p; in mime_hdr_new() local 809 if ((tmpname = OPENSSL_strdup(name)) == NULL) in mime_hdr_new() 811 for (p = tmpname; *p; p++) in mime_hdr_new() 823 mhdr->name = tmpname; in mime_hdr_new() 830 OPENSSL_free(tmpname); in mime_hdr_new() 838 char *tmpname = NULL, *tmpval = NULL, *p; in mime_hdr_addparam() local 842 tmpname = OPENSSL_strdup(name); in mime_hdr_addparam() 843 if (!tmpname) in mime_hdr_addparam() 845 for (p = tmpname; *p; p++) in mime_hdr_addparam() 857 mparam->param_name = tmpname; in mime_hdr_addparam() [all …]
|
/netbsd-src/crypto/external/bsd/openssl/dist/crypto/asn1/ |
H A D | asn_mime.c | 852 char *tmpname = NULL, *tmpval = NULL, *p; in mime_hdr_new() local 855 if ((tmpname = OPENSSL_strdup(name)) == NULL) in mime_hdr_new() 857 for (p = tmpname; *p; p++) in mime_hdr_new() 869 mhdr->name = tmpname; in mime_hdr_new() 876 OPENSSL_free(tmpname); in mime_hdr_new() 884 char *tmpname = NULL, *tmpval = NULL, *p; in mime_hdr_addparam() local 888 tmpname = OPENSSL_strdup(name); in mime_hdr_addparam() 889 if (!tmpname) in mime_hdr_addparam() 891 for (p = tmpname; *p; p++) in mime_hdr_addparam() 903 mparam->param_name = tmpname; in mime_hdr_addparam() [all …]
|
/netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/dh/ |
H A D | dh_meth.c | 65 char *tmpname = OPENSSL_strdup(name); in DH_meth_set1_name() local 67 if (tmpname == NULL) { in DH_meth_set1_name() 73 dhm->name = tmpname; in DH_meth_set1_name()
|
/netbsd-src/crypto/external/bsd/openssl/dist/crypto/dh/ |
H A D | dh_meth.c | 71 char *tmpname = OPENSSL_strdup(name); in DH_meth_set1_name() local 73 if (tmpname == NULL) { in DH_meth_set1_name() 79 dhm->name = tmpname; in DH_meth_set1_name()
|
/netbsd-src/crypto/external/bsd/openssl.old/dist/crypto/dsa/ |
H A D | dsa_meth.c | 73 char *tmpname = OPENSSL_strdup(name); in DSA_meth_set1_name() local 75 if (tmpname == NULL) { in DSA_meth_set1_name() 81 dsam->name = tmpname; in DSA_meth_set1_name()
|
/netbsd-src/external/mpl/bind/dist/lib/dns/ |
H A D | dst_parse.c | 591 char tmpname[NAME_MAX]; in dst__privstruct_parse() 633 isc_buffer_init(&tmpb, tmpname, sizeof(tmpname)); in dst__privstruct_writefile() 640 fp = dst_key_open(tmpname, S_IRUSR | S_IWUSR); in dst__privstruct_writefile() 714 return dst_key_cleanup(tmpname, fp); in dst__privstruct_writefile() 745 return dst_key_cleanup(tmpname, fp); in dst__privstruct_writefile() 757 result = dst_key_close(tmpname, fp, filename); in dst__privstruct_writefile() 626 char tmpname[NAME_MAX]; dst__privstruct_writefile() local
|
H A D | dst_internal.h | 248 dst_key_open(char *tmpname, mode_t mode); 250 dst_key_close(char *tmpname, FILE *fp, char *filename); 252 dst_key_cleanup(char *tmpname, FILE *fp);
|
H A D | dst_api.c | 912 dst_key_open(char *tmpname, mode_t mode) { 914 int fd = mkstemp(tmpname); in dst_key_open() argument 931 (void)unlink(tmpname); in dst_key_open() 936 dst_key_close(char *tmpname, FILE *fp, char *filename) { 938 return dst_key_cleanup(tmpname, fp); in dst_key_close() argument 941 if (rename(tmpname, filename) != 0) { in dst_key_close() 942 return dst_key_cleanup(tmpname, fp); in dst_key_close() 956 dst_key_cleanup(char *tmpname, FILE *fp) { 965 (void)unlink(tmpname); in dst_key_cleanup() 2064 char tmpname[NAME_MA in printtime() 958 dst_key_cleanup(char * tmpname,FILE * fp) dst_key_cleanup() argument 2102 char tmpname[NAME_MAX]; write_key_state() local 2188 char tmpname[NAME_MAX]; write_public_key() local [all...] |
/netbsd-src/crypto/external/bsd/openssl/dist/crypto/dsa/ |
H A D | dsa_meth.c | 72 char *tmpname = OPENSSL_strdup(name); in DSA_meth_set1_name() local 74 if (tmpname == NULL) { in DSA_meth_set1_name() 80 dsam->name = tmpname; in DSA_meth_set1_name()
|
/netbsd-src/usr.bin/unifdef/ |
H A D | unifdef.c | 226 static char tmpname[MAXPATHLEN]; /* used when overwriting */ variable 355 snprintf(tmpname, sizeof(tmpname), "%s/unifdef.XXXXXX", in main() 357 if ((ofd = mkstemp(tmpname)) != -1) in main() 508 unlink(tmpname); in done() 512 if (overwriting && rename(tmpname, ofilename)) { in done() 513 unlink(tmpname); in done() 1033 unlink(tmpname); in error()
|
/netbsd-src/external/gpl2/gettext/dist/gettext-tools/examples/hello-c++-kde/admin/ |
H A D | cvs.sh | 409 tmpname="$PWD/messages.log" 434 ) 2>&1 | grep -v '^make\[1\]' > $tmpname 435 test -s $tmpname && { echo $subdir ; cat "$tmpname"; } 440 rm -f $tmpname
|