Rename PRIVATE to PPRIVATE in order to avoid a name clash resulting in errors like this: putty-0.75/cmdgen.c:228:12: error: expected identifier before numeric constant enum { PRIVATE, PUBLIC, PUBLICO, FP, OPENSSH_AUTO, --- putty-0.78/cmdgen.c.orig 2022-10-28 19:19:44.000000000 +0000 +++ putty-0.78/cmdgen.c 2022-11-02 21:26:32.194021545 +0000 @@ -240,8 +240,8 @@ BinarySource *infile_bs = NULL; enum { NOKEYGEN, RSA1, RSA2, DSA, ECDSA, EDDSA } keytype = NOKEYGEN; char *outfile = NULL, *outfiletmp = NULL; - enum { PRIVATE, PUBLIC, PUBLICO, FP, OPENSSH_AUTO, - OPENSSH_NEW, SSHCOM, TEXT, CERTINFO } outtype = PRIVATE; + enum { PPRIVATE, PUBLIC, PUBLICO, FP, OPENSSH_AUTO, + OPENSSH_NEW, SSHCOM, TEXT, CERTINFO } outtype = PPRIVATE; int bits = -1; const char *comment = NULL; char *origcomment = NULL; @@ -591,7 +591,7 @@ else if (!strcmp(p, "public-openssh")) outtype = PUBLICO; else if (!strcmp(p, "private")) - outtype = PRIVATE; + outtype = PPRIVATE; else if (!strcmp(p, "fingerprint")) outtype = FP; else if (!strcmp(p, "private-openssh")) @@ -742,7 +742,7 @@ * We must save the private part when generating a new key. */ if (keytype != NOKEYGEN && - (outtype != PRIVATE && outtype != OPENSSH_AUTO && + (outtype != PPRIVATE && outtype != OPENSSH_AUTO && outtype != OPENSSH_NEW && outtype != SSHCOM && outtype != TEXT)) { fprintf(stderr, "puttygen: this would generate a new key but " "discard the private part\n"); @@ -819,8 +819,8 @@ * Also in this code, we bomb out if the input and output file * formats are the same and no other action is performed. */ - if ((intype == SSH_KEYTYPE_SSH1 && outtype == PRIVATE) || - (intype == SSH_KEYTYPE_SSH2 && outtype == PRIVATE) || + if ((intype == SSH_KEYTYPE_SSH1 && outtype == PPRIVATE) || + (intype == SSH_KEYTYPE_SSH2 && outtype == PPRIVATE) || (intype == SSH_KEYTYPE_OPENSSH_PEM && outtype == OPENSSH_AUTO) || (intype == SSH_KEYTYPE_OPENSSH_NEW && outtype == OPENSSH_NEW) || (intype == SSH_KEYTYPE_SSHCOM && outtype == SSHCOM)) { @@ -841,7 +841,7 @@ * Bomb out rather than automatically choosing to write * a private key file to stdout. */ - if (outtype == PRIVATE || outtype == OPENSSH_AUTO || + if (outtype == PPRIVATE || outtype == OPENSSH_AUTO || outtype == OPENSSH_NEW || outtype == SSHCOM) { fprintf(stderr, "puttygen: need to specify an output file\n"); RETURN(1); @@ -866,7 +866,7 @@ intype == SSH_KEYTYPE_SSH2_PUBLIC_RFC4716 || intype == SSH_KEYTYPE_SSH2_PUBLIC_OPENSSH); bool outtype_has_private = - outtype == PRIVATE || outtype == OPENSSH_AUTO || + outtype == PPRIVATE || outtype == OPENSSH_AUTO || outtype == OPENSSH_NEW || outtype == SSHCOM; if (outtype_has_private || intype_entirely_encrypted || (outtype == TEXT && intype_has_private)) @@ -1314,7 +1314,7 @@ bool ret; int real_outtype; - case PRIVATE: + case PPRIVATE: random_ref(); /* we'll need a few random bytes in the save file */ if (sshver == 1) { assert(ssh1key);