--- doctype/usmarc.cxx.orig	Wed Dec  4 22:02:09 1996
+++ doctype/usmarc.cxx	Sat Apr 22 01:27:43 2000
@@ -453,11 +453,19 @@ if (RecordSyntax == SutrsRecordSyntax) {
    // "Sutrs" is the Z39.50-compliant way to say "ASCII".
    
 
-   CHR *TempFile = tmpnam(NULL);
+   CHR TempFile[30];
+   sprintf(TempFile, "%s/usm.XXXXXXXXXX", P_tmpdir);
+
+   if ((fp = fdopen(mkstemp(TempFile), "w")) == NULL) {
+	perror(TempFile);
+        exit(1);
+   }
+#if 0
    if((fp = fopen(TempFile, "w")) == NULL) {
 	perror(TempFile);
 	exit(1);
 	}
+#endif
 
    MARC *m;
    m = new MARC(myBuff);
