Skip to content

Commit

Permalink
Fix builds against current libcups3.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Sep 11, 2024
1 parent e63c1cc commit 651a37c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
4 changes: 2 additions & 2 deletions pappl/mainloop-subcommands.c
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ default_system_cb(
else if (!strcmp(valptr, "web-security") || !strncmp(valptr, "web-security,", 13))
soptions |= PAPPL_SOPTIONS_WEB_SECURITY;
else if (!strcmp(valptr, "no-tls") || !strncmp(valptr, "no-tls,", 7))
soptions = (pappl_soptions_t)((soptions | PAPPL_SOPTIONS_NO_TLS) & ~PAPPL_SOPTIONS_WEB_TLS);
soptions = (pappl_soptions_t)((soptions | PAPPL_SOPTIONS_NO_TLS) & (pappl_soptions_t)~PAPPL_SOPTIONS_WEB_TLS);
if ((valptr = strchr(valptr, ',')) != NULL)
valptr ++;
}
Expand Down Expand Up @@ -1908,7 +1908,7 @@ load_options(const char *filename, // I - Filename
continue;

// Parse any options on this line...
num_loptions = cupsParseOptions(line, 0, &loptions);
num_loptions = cupsParseOptions(line, /*end*/NULL, 0, &loptions);

// Copy any unset line options to the options array...
for (i = num_loptions, loption = loptions; i > 0; i --, loption ++)
Expand Down
2 changes: 1 addition & 1 deletion pappl/mainloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ papplMainloop(
return (1);
}

num_options = cupsParseOptions(argv[i], num_options, &options);
num_options = cupsParseOptions(argv[i], /*end*/NULL, num_options, &options);
break;

case 't' : // -t TITLE
Expand Down
8 changes: 4 additions & 4 deletions pappl/system-loadsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ papplSystemLoadState(
pappl_printer_t *printer; // Current printer


if ((num_options = cupsParseOptions(value, 0, &options)) == 0 || (printer_id = cupsGetOption("id", num_options, options)) == NULL || strtol(printer_id, NULL, 10) <= 0 || (printer_name = cupsGetOption("name", num_options, options)) == NULL || (device_id = cupsGetOption("did", num_options, options)) == NULL || (device_uri = cupsGetOption("uri", num_options, options)) == NULL || (driver_name = cupsGetOption("driver", num_options, options)) == NULL)
if ((num_options = cupsParseOptions(value, /*end*/NULL, 0, &options)) == 0 || (printer_id = cupsGetOption("id", num_options, options)) == NULL || strtol(printer_id, NULL, 10) <= 0 || (printer_name = cupsGetOption("name", num_options, options)) == NULL || (device_id = cupsGetOption("did", num_options, options)) == NULL || (device_uri = cupsGetOption("uri", num_options, options)) == NULL || (driver_name = cupsGetOption("driver", num_options, options)) == NULL)
{
papplLog(system, PAPPL_LOGLEVEL_ERROR, "Bad printer definition on line %d of \"%s\".", linenum, filename);
break;
Expand Down Expand Up @@ -312,7 +312,7 @@ papplSystemLoadState(
// Attribute filename
name[128]; // Option name

num_options = cupsParseOptions(value, 0, &options);
num_options = cupsParseOptions(value, /*end*/NULL, 0, &options);

if ((job_id = cupsGetOption("id", num_options, options)) == NULL || strtol(job_id, NULL, 10) <= 0 || (job_name = cupsGetOption("name", num_options, options)) == NULL || (job_username = cupsGetOption("username", num_options, options)) == NULL)
{
Expand Down Expand Up @@ -819,7 +819,7 @@ parse_contact(char *value, // I - Value


memset(contact, 0, sizeof(pappl_contact_t));
num_options = cupsParseOptions(value, 0, &options);
num_options = cupsParseOptions(value, /*end*/NULL, 0, &options);

for (i = num_options, option = options; i > 0; i --, option ++)
{
Expand Down Expand Up @@ -851,7 +851,7 @@ parse_media_col(


memset(media, 0, sizeof(pappl_media_col_t));
num_options = cupsParseOptions(value, 0, &options);
num_options = cupsParseOptions(value, /*end*/NULL, 0, &options);

for (i = num_options, option = options; i > 0; i --, option ++)
{
Expand Down
1 change: 1 addition & 0 deletions testsuite/testpappl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3800,6 +3800,7 @@ test_client_max(pappl_system_t *system, // I - System

// Prepare client data...
memset(&data, 0, sizeof(data));
memset(threads, 0, sizeof(threads));
data.system = system;
data.errors = cupsArrayNew(/*cb*/NULL, /*cbdata*/NULL, /*hashcb*/NULL, /*hashsize*/0, (cups_acopy_cb_t)strcopy_cb, (cups_afree_cb_t)strfree_cb);
cupsMutexInit(&data.mutex);
Expand Down
6 changes: 6 additions & 0 deletions xcode/pappl.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@
27AB72B524740B3400691FE7 /* link.c in Sources */ = {isa = PBXBuildFile; fileRef = 27AB72B324740B3300691FE7 /* link.c */; };
27BFDDCA279EF534000D073A /* subscription-ipp.c in Sources */ = {isa = PBXBuildFile; fileRef = 27BFDDC9279EF534000D073A /* subscription-ipp.c */; };
27BFDDCB279EF534000D073A /* subscription-ipp.c in Sources */ = {isa = PBXBuildFile; fileRef = 27BFDDC9279EF534000D073A /* subscription-ipp.c */; };
27D086012C9226A100DF20EC /* libdbus-1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2764DBD52C23800D00DF08AD /* libdbus-1.a */; };
27D086022C9226AF00DF20EC /* libdbus-1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2764DBD52C23800D00DF08AD /* libdbus-1.a */; };
27D086042C9226D700DF20EC /* libdbus-1.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2764DBD52C23800D00DF08AD /* libdbus-1.a */; };
27D676232493D73E008F734C /* mainloop-subcommands.c in Sources */ = {isa = PBXBuildFile; fileRef = 27D6761F2493D73D008F734C /* mainloop-subcommands.c */; };
27D676242493D73E008F734C /* mainloop-subcommands.c in Sources */ = {isa = PBXBuildFile; fileRef = 27D6761F2493D73D008F734C /* mainloop-subcommands.c */; };
27D676252493D73E008F734C /* mainloop.c in Sources */ = {isa = PBXBuildFile; fileRef = 27D676202493D73E008F734C /* mainloop.c */; };
Expand Down Expand Up @@ -527,6 +530,7 @@
274AD64D253F52B10033CAAB /* libz.tbd in Frameworks */,
274AD645253F52B10033CAAB /* CoreFoundation.framework in Frameworks */,
274AD64B253F52B10033CAAB /* IOKit.framework in Frameworks */,
27D086012C9226A100DF20EC /* libdbus-1.a in Frameworks */,
27A8CD3B2B630DA600D573D1 /* Security.framework in Frameworks */,
274AD64E253F52B10033CAAB /* SystemConfiguration.framework in Frameworks */,
);
Expand All @@ -545,6 +549,7 @@
27E8655925F176FB00A8F8D9 /* libpng16.a in Frameworks */,
27E8655E25F176FB00A8F8D9 /* libpam.tbd in Frameworks */,
27FF08FD282EEA4900DAFC7D /* libresolv.tbd in Frameworks */,
27D086022C9226AF00DF20EC /* libdbus-1.a in Frameworks */,
27E8655825F176FB00A8F8D9 /* libusb-1.0.a in Frameworks */,
27E8655F25F176FB00A8F8D9 /* libz.tbd in Frameworks */,
);
Expand All @@ -561,6 +566,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
27D086042C9226D700DF20EC /* libdbus-1.a in Frameworks */,
271F98D02AD5B1B1005F735A /* libcrypto.a in Frameworks */,
271F98CF2AD5B17F005F735A /* libcups3.a in Frameworks */,
27FF08F9282EE88A00DAFC7D /* libiconv.tbd in Frameworks */,
Expand Down

0 comments on commit 651a37c

Please sign in to comment.