Mac installer: Make checks for OS X version consistent

This commit is contained in:
Charlie Fenton 2013-11-18 00:56:44 -08:00
parent 58170a12e8
commit 0341a5d0a0
5 changed files with 10 additions and 10 deletions

View File

@ -1118,7 +1118,7 @@ static int compareOSVersionTo(int toMajor, int toMinor) {
if (err != noErr) {
fprintf(stderr, "Gestalt(gestaltSystemVersionMajor) returned error %ld\n", err);
fflush(stderr);
return 0;
return -1; // gestaltSystemVersionMajor selector was not available before OS 10.4
}
if (major < toMajor) return -1;
if (major > toMajor) return 1;
@ -1126,7 +1126,7 @@ static int compareOSVersionTo(int toMajor, int toMinor) {
if (err != noErr) {
fprintf(stderr, "Gestalt(gestaltSystemVersionMinor) returned error %ld\n", err);
fflush(stderr);
return 0;
return -1; // gestaltSystemVersionMajor selector was not available before OS 10.4
}
if (minor < toMinor) return -1;
if (minor > toMinor) return 1;

View File

@ -611,7 +611,7 @@ static int compareOSVersionTo(int toMajor, int toMinor) {
if (err != noErr) {
fprintf(stderr, "Gestalt(gestaltSystemVersionMajor) returned error %ld\n", (long)err);
fflush(stderr);
return 0;
return -1; // gestaltSystemVersionMajor selector was not available before OS 10.4
}
if (major < toMajor) return -1;
if (major > toMajor) return 1;
@ -619,7 +619,7 @@ static int compareOSVersionTo(int toMajor, int toMinor) {
if (err != noErr) {
fprintf(stderr, "Gestalt(gestaltSystemVersionMinor) returned error %ld\n", (long)err);
fflush(stderr);
return 0;
return -1; // gestaltSystemVersionMajor selector was not available before OS 10.4
}
if (minor < toMinor) return -1;
if (minor > toMinor) return 1;

View File

@ -267,7 +267,7 @@ static int compareOSVersionTo(int toMajor, int toMinor) {
if (err != noErr) {
fprintf(stderr, "Gestalt(gestaltSystemVersionMajor) returned error %ld\n", err);
fflush(stderr);
return 0;
return -1; // gestaltSystemVersionMajor selector was not available before OS 10.4
}
if (major < toMajor) return -1;
if (major > toMajor) return 1;
@ -275,7 +275,7 @@ static int compareOSVersionTo(int toMajor, int toMinor) {
if (err != noErr) {
fprintf(stderr, "Gestalt(gestaltSystemVersionMinor) returned error %ld\n", err);
fflush(stderr);
return 0;
return -1; // gestaltSystemVersionMajor selector was not available before OS 10.4
}
if (minor < toMinor) return -1;
if (minor > toMinor) return 1;

View File

@ -1772,7 +1772,7 @@ static int compareOSVersionTo(int toMajor, int toMinor) {
if (err != noErr) {
fprintf(stdout, "Gestalt(gestaltSystemVersionMajor) returned error %ld\n", err);
fflush(stdout);
exit(-1);
return -1; // gestaltSystemVersionMajor selector was not available before OS 10.4
}
if (major < toMajor) return -1;
if (major > toMajor) return 1;
@ -1780,7 +1780,7 @@ static int compareOSVersionTo(int toMajor, int toMinor) {
if (err != noErr) {
fprintf(stdout, "Gestalt(gestaltSystemVersionMinor) returned error %ld\n", err);
fflush(stdout);
exit(-1);
return -1; // gestaltSystemVersionMajor selector was not available before OS 10.4
}
if (minor < toMinor) return -1;
if (minor > toMinor) return 1;

View File

@ -1603,7 +1603,7 @@ static int compareOSVersionTo(int toMajor, int toMinor) {
if (err != noErr) {
fprintf(stderr, "Gestalt(gestaltSystemVersionMajor) returned error %ld\n", err);
fflush(stderr);
return 0;
return -1; // gestaltSystemVersionMajor selector was not available before OS 10.4
}
if (major < toMajor) return -1;
if (major > toMajor) return 1;
@ -1611,7 +1611,7 @@ static int compareOSVersionTo(int toMajor, int toMinor) {
if (err != noErr) {
fprintf(stderr, "Gestalt(gestaltSystemVersionMinor) returned error %ld\n", err);
fflush(stderr);
return 0;
return -1; // gestaltSystemVersionMajor selector was not available before OS 10.4
}
if (minor < toMinor) return -1;
if (minor > toMinor) return 1;