[packages/papi] add type fixes; rel 6
atler
atler at pld-linux.org
Tue Mar 24 00:20:44 CET 2026
commit 8d1396137446c55afb38bfe38095bac1416001ab
Author: Jan Palus <atler at pld-linux.org>
Date: Tue Mar 24 00:20:08 2026 +0100
add type fixes; rel 6
papi.spec | 4 +-
types.patch | 1040 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 1043 insertions(+), 1 deletion(-)
---
diff --git a/papi.spec b/papi.spec
index bfae44c..15abc19 100644
--- a/papi.spec
+++ b/papi.spec
@@ -1,5 +1,5 @@
# TODO: config file for mod_ipp
-%define rel 5
+%define rel 6
Summary: Free Standards Group Open Printing API and applications implementation
Summary(pl.UTF-8): Implementacja API i aplikacji Free Standards Group Open Printing
Name: papi
@@ -15,6 +15,7 @@ Patch1: %{name}-apache2.patch
Patch2: %{name}-install.patch
Patch3: format-security.patch
Patch4: %{name}-apache24.patch
+Patch5: types.patch
URL: http://openprinting.sourceforge.net/
BuildRequires: apache-devel >= 2.0
BuildRequires: apr-devel >= 1:1.0
@@ -107,6 +108,7 @@ Statyczne Biblioteki Free Standards Group Open Printing API.
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
+%patch -P5 -p1
%build
%{__libtoolize}
diff --git a/types.patch b/types.patch
new file mode 100644
index 0000000..31857e2
--- /dev/null
+++ b/types.patch
@@ -0,0 +1,1040 @@
+--- papi-1.0_beta/source/libpapi-common/papi.h.orig 2006-02-01 06:55:01.000000000 +0100
++++ papi-1.0_beta/source/libpapi-common/papi.h 2026-03-23 17:04:12.114266665 +0100
+@@ -405,9 +405,9 @@
+ * protocol support implementations(psms) and the tightly bound
+ * listener library. Do not use these in your applications.
+ */
+-extern void list_append();
+-extern void list_concatenate();
+-extern void list_remove();
++extern int list_append(void ***list, void *item);
++extern int list_concatenate(void ***result, void **list2);
++extern void list_remove(void **list, void *item);
+ extern void copy_attributes(papi_attribute_t ***result,
+ papi_attribute_t **list);
+ extern void split_and_copy_attributes(char **list,
+--- papi-1.0_beta/source/libpapi-common/attribute.c.orig 2006-02-25 07:06:36.000000000 +0100
++++ papi-1.0_beta/source/libpapi-common/attribute.c 2026-03-23 17:15:11.341314375 +0100
+@@ -198,7 +198,7 @@
+ if ((tmp = papiAttributeValueDup(type, value)) == NULL)
+ return (PAPI_TEMPORARY_ERROR);
+
+- list_append(values, tmp);
++ list_append((void***)values, tmp);
+ }
+
+ return (PAPI_OK);
+@@ -237,7 +237,7 @@
+ /* if we don't have one, create it and add it to the list */
+ if ((attribute == NULL) &&
+ ((attribute = papiAttributeAlloc(name, type)) != NULL))
+- list_append(list, attribute);
++ list_append((void***)list, attribute);
+
+ /* if we don't have one by now, it's most likely an alloc fail */
+ if (attribute == NULL)
+@@ -363,7 +363,7 @@
+ if ((attribute = papiAttributeListFind(*list, name)) == NULL)
+ return (PAPI_NOT_FOUND);
+
+- list_remove(*list, attribute);
++ list_remove((void**)*list, attribute);
+ papiAttributeFree(attribute);
+
+ return (PAPI_OK);
+--- papi-1.0_beta/source/libpapi-dynamic/papi_impl.h.orig 2006-01-28 08:02:04.000000000 +0100
++++ papi-1.0_beta/source/libpapi-dynamic/papi_impl.h 2026-03-23 17:18:07.305639043 +0100
+@@ -64,8 +64,6 @@
+
+
+
+-extern void list_remove();
+-
+ #ifdef __cplusplus
+ }
+ #endif
+--- papi-1.0_beta/source/libpapi-dynamic/service.c.orig 2006-02-23 20:35:34.000000000 +0100
++++ papi-1.0_beta/source/libpapi-dynamic/service.c 2026-03-23 17:32:42.400561261 +0100
+@@ -79,9 +79,9 @@
+
+ if ((svc->peer_fd != -1) && (svc->so_handle != NULL) &&
+ (svc->svc_handle != NULL)) {
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, int);
+
+- f = (papi_status_t (*)())psm_sym(svc, "papiServiceSetPeer");
++ f = (papi_status_t (*)(void*, int))psm_sym(svc, "papiServiceSetPeer");
+
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->peer_fd);
+@@ -106,9 +106,9 @@
+ * handle.
+ */
+ if (svc->so_handle != NULL) {
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, char*, char*, int (*)(papi_service_t), papi_encryption_t, void*);
+
+- f = (papi_status_t (*)())psm_sym(svc, "papiServiceCreate");
++ f = (papi_status_t (*)(void*, char*, char*, char*, int (*)(papi_service_t), papi_encryption_t, void*))psm_sym(svc, "papiServiceCreate");
+
+ if (f != NULL) {
+ char *user = svc->user;
+@@ -187,9 +187,9 @@
+
+ if (svc->so_handle != NULL) {
+ if (svc->svc_handle != NULL) {
+- void (*f)();
++ void (*f)(void*);
+
+- f = (void (*)())psm_sym(svc,
++ f = (void (*)(void*))psm_sym(svc,
+ "papiServiceDestroy");
+ f(svc->svc_handle);
+ }
+@@ -233,13 +233,13 @@
+
+ if (handle != NULL) {
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*);
+
+ if (svc->user != NULL)
+ free(svc->user);
+ if (user_name != NULL)
+ svc->user = strdup(user_name);
+- f = (papi_status_t (*)())psm_sym(svc, "papiServiceSetUserName");
++ f = (papi_status_t (*)(void*, char*))psm_sym(svc, "papiServiceSetUserName");
+ if (f != NULL)
+ result = f(svc->svc_handle, user_name);
+ } else
+@@ -255,13 +255,13 @@
+
+ if (handle != NULL) {
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*);
+
+ if (svc->password != NULL)
+ free(svc->password);
+ if (password != NULL)
+ svc->password = strdup(password);
+- f = (papi_status_t (*)())psm_sym(svc, "papiServiceSetPassword");
++ f = (papi_status_t (*)(void*, char*))psm_sym(svc, "papiServiceSetPassword");
+ if (f != NULL)
+ result = f(svc->svc_handle, password);
+ } else
+@@ -277,10 +277,10 @@
+
+ if (handle != NULL) {
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, papi_encryption_t);
+
+ svc->encryption = encryption;
+- f = (papi_status_t (*)())psm_sym(svc,
++ f = (papi_status_t (*)(void*, papi_encryption_t))psm_sym(svc,
+ "papiServiceSetEncryption");
+ if (f != NULL)
+ result = f(svc->svc_handle, encryption);
+@@ -297,10 +297,10 @@
+
+ if (handle != NULL) {
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, int(*)(papi_service_t));
+
+ svc->authCB = authCB;
+- f = (papi_status_t (*)())psm_sym(svc, "papiServiceSetAuthCB");
++ f = (papi_status_t (*)(void*, int(*)(papi_service_t)))psm_sym(svc, "papiServiceSetAuthCB");
+ if (f != NULL)
+ result = f(svc->svc_handle, authCB);
+ } else
+@@ -317,10 +317,10 @@
+
+ if (handle != NULL) {
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, void*);
+
+ svc->app_data = (void *)app_data;
+- f = (papi_status_t (*)())psm_sym(svc, "papiServiceSetAppData");
++ f = (papi_status_t (*)(void*, void*))psm_sym(svc, "papiServiceSetAppData");
+ if (f != NULL)
+ result = f(svc->svc_handle, app_data);
+ } else
+@@ -336,9 +336,9 @@
+
+ if (handle != NULL) {
+ service_t *svc = handle;
+- char *(*f)();
++ char *(*f)(void*);
+
+- f = (char *(*)())psm_sym(svc, "papiServiceGetServiceName");
++ f = (char *(*)(void*))psm_sym(svc, "papiServiceGetServiceName");
+ if (f != NULL)
+ result = f(svc->svc_handle);
+ if (result == NULL)
+@@ -355,9 +355,9 @@
+
+ if (handle != NULL) {
+ service_t *svc = handle;
+- char *(*f)();
++ char *(*f)(void*);
+
+- f = (char *(*)())psm_sym(svc, "papiServiceGetUserName");
++ f = (char *(*)(void*))psm_sym(svc, "papiServiceGetUserName");
+ if (f != NULL)
+ result = f(svc->svc_handle);
+ if (result == NULL)
+@@ -374,9 +374,9 @@
+
+ if (handle != NULL) {
+ service_t *svc = handle;
+- char *(*f)();
++ char *(*f)(void*);
+
+- f = (char *(*)())psm_sym(svc, "papiServiceGetPassword");
++ f = (char *(*)(void*))psm_sym(svc, "papiServiceGetPassword");
+ if (f != NULL)
+ result = f(svc->svc_handle);
+ if (result == NULL)
+@@ -393,9 +393,9 @@
+
+ if (handle != NULL) {
+ service_t *svc = handle;
+- papi_encryption_t (*f)();
++ papi_encryption_t (*f)(void*);
+
+- f = (papi_encryption_t (*)())psm_sym(svc,
++ f = (papi_encryption_t (*)(void*))psm_sym(svc,
+ "papiServiceGetEncryption");
+ if (f != NULL)
+ result = f(svc->svc_handle);
+@@ -413,9 +413,9 @@
+
+ if (handle != NULL) {
+ service_t *svc = handle;
+- void *(*f)();
++ void *(*f)(void*);
+
+- f = (void *(*)())psm_sym(svc, "papiServiceGetAppData");
++ f = (void *(*)(void*))psm_sym(svc, "papiServiceGetAppData");
+ if (f != NULL)
+ result = f(svc->svc_handle);
+ if (result == NULL)
+@@ -432,9 +432,9 @@
+ service_t *svc = handle;
+
+ if (handle != NULL) {
+- papi_attribute_t **(*f)();
++ papi_attribute_t **(*f)(void*);
+
+- f = (papi_attribute_t **(*)())psm_sym(svc,
++ f = (papi_attribute_t **(*)(void*))psm_sym(svc,
+ "papiServiceGetAttributeList");
+ if (f != NULL)
+ result = f(svc->svc_handle);
+@@ -451,9 +451,9 @@
+ service_t *svc = handle;
+
+ if (handle != NULL) {
+- char *(*f)();
++ char *(*f)(void*);
+
+- f = (char *(*)())psm_sym(svc, "papiServiceGetStatusMessage");
++ f = (char *(*)(void*))psm_sym(svc, "papiServiceGetStatusMessage");
+ if (f != NULL)
+ result = f(svc->svc_handle);
+ }
+--- papi-1.0_beta/source/libpapi-dynamic/printer.c.orig 2005-10-01 07:49:10.000000000 +0200
++++ papi-1.0_beta/source/libpapi-dynamic/printer.c 2026-03-23 17:46:32.621885751 +0100
+@@ -16,9 +16,9 @@
+ printer_t *tmp = printer;
+
+ if (tmp != NULL) {
+- void (*f)();
++ void (*f)(papi_printer_t*);
+
+- f = (void (*)())psm_sym(tmp->svc, "papiPrinterFree");
++ f = (void (*)(papi_printer_t*))psm_sym(tmp->svc, "papiPrinterFree");
+ if (f != NULL)
+ f(tmp->printer);
+ if (tmp->attributes != NULL)
+@@ -48,7 +48,7 @@
+ {
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ papi_printer_t *svc_printers = NULL;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char**, papi_filter_t*, papi_printer_t **);
+
+ if ((svc == NULL) || (printers == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -57,7 +57,7 @@
+ if ((result = service_connect(svc, svc->name)) != PAPI_OK)
+ return (result);
+
+- f = (papi_status_t (*)())psm_sym(svc, "papiPrintersList");
++ f = (papi_status_t (*)(void*, char**, papi_filter_t*, papi_printer_t **))psm_sym(svc, "papiPrintersList");
+ if (f != NULL)
+ result = f(svc->svc_handle, requested_attrs, filter,
+ &svc_printers);
+@@ -211,7 +211,7 @@
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+ printer_t *p = NULL;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, char**, papi_attribute_t**, papi_printer_t**);
+
+ if ((svc == NULL) || (name == NULL) || (printer == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -224,7 +224,7 @@
+
+ if (svc->name != NULL) {
+ p->svc = svc;
+- f = (papi_status_t (*)())psm_sym(p->svc, "papiPrinterQuery");
++ f = (papi_status_t (*)(void*, char*, char**, papi_attribute_t**, papi_printer_t**))psm_sym(p->svc, "papiPrinterQuery");
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, requested_attrs,
+ job_attributes, &p->printer);
+@@ -246,7 +246,7 @@
+ {
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, char*);
+
+ if ((svc == NULL) || (name == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -254,7 +254,7 @@
+ if ((result = service_connect(svc, name)) != PAPI_OK)
+ return (result);
+
+- f = (papi_status_t (*)())psm_sym(svc, function);
++ f = (papi_status_t (*)(void*, char*, char*))psm_sym(svc, function);
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, message);
+
+@@ -267,7 +267,7 @@
+ {
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*);
+
+ if ((svc == NULL) || (name == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -275,7 +275,7 @@
+ if ((result = service_connect(svc, name)) != PAPI_OK)
+ return (result);
+
+- f = (papi_status_t (*)())psm_sym(svc, function);
++ f = (papi_status_t (*)(void*, char*))psm_sym(svc, function);
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name);
+
+@@ -318,7 +318,7 @@
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+ printer_t *p = NULL;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, papi_attribute_t**, papi_printer_t**);
+
+ if ((svc == NULL) || (name == NULL) || (attributes == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -330,7 +330,7 @@
+ return (PAPI_TEMPORARY_ERROR);
+
+ p->svc = svc;
+- f = (papi_status_t (*)())psm_sym(p->svc, function);
++ f = (papi_status_t (*)(void*, char*, papi_attribute_t**, papi_printer_t**))psm_sym(p->svc, function);
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, attributes,
+ &p->printer);
+@@ -360,7 +360,7 @@
+ {
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*);
+
+ if ((svc == NULL) || (name == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -368,7 +368,7 @@
+ if ((result = service_connect(svc, name)) != PAPI_OK)
+ return (result);
+
+- f = (papi_status_t (*)())psm_sym(svc, "papiPrinterRemove");
++ f = (papi_status_t (*)(void*, char*))psm_sym(svc, "papiPrinterRemove");
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name);
+
+@@ -381,7 +381,7 @@
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+ papi_job_t *svc_jobs = NULL;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, papi_job_t**);
+
+ if ((svc == NULL) || (name == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -389,7 +389,7 @@
+ if ((result = service_connect(svc, name)) != PAPI_OK)
+ return (result);
+
+- f = (papi_status_t (*)())psm_sym(svc, "papiPrinterPurgeJobs");
++ f = (papi_status_t (*)(void*, char*, papi_job_t**))psm_sym(svc, "papiPrinterPurgeJobs");
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, &svc_jobs);
+
+@@ -427,7 +427,7 @@
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+ papi_job_t *svc_jobs = NULL;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, char**, int, int, papi_job_t**);
+
+ if ((svc == NULL) || (name == NULL) || (jobs == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -435,7 +435,7 @@
+ if ((result = service_connect(svc, name)) != PAPI_OK)
+ return (result);
+
+- f = (papi_status_t (*)())psm_sym(svc, "papiPrinterListJobs");
++ f = (papi_status_t (*)(void*, char*, char**, int, int, papi_job_t**))psm_sym(svc, "papiPrinterListJobs");
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, requested_attrs,
+ type_mask, max_num_jobs, &svc_jobs);
+@@ -474,9 +474,9 @@
+ printer_t *p = printer;
+
+ if ((p != NULL) && (p->printer != NULL)) {
+- papi_attribute_t **(*f)();
++ papi_attribute_t **(*f)(papi_printer_t*);
+
+- f = (papi_attribute_t **(*)())psm_sym(p->svc,
++ f = (papi_attribute_t **(*)(papi_printer_t*))psm_sym(p->svc,
+ "papiPrinterGetAttributeList");
+ if (f != NULL)
+ result = f(p->printer);
+--- papi-1.0_beta/source/libpapi-dynamic/job.c.orig 2005-11-04 08:29:57.000000000 +0100
++++ papi-1.0_beta/source/libpapi-dynamic/job.c 2026-03-23 20:51:29.243949781 +0100
+@@ -16,9 +16,9 @@
+ job_t *tmp = (job_t *)job;
+
+ if (tmp != NULL) {
+- void (*f)();
++ void (*f)(papi_job_t*);
+
+- f = (void (*)())psm_sym(tmp->svc, "papiJobFree");
++ f = (void (*)(papi_job_t*))psm_sym(tmp->svc, "papiJobFree");
+ if (f != NULL)
+ f(tmp->job);
+ free(tmp);
+@@ -44,9 +44,9 @@
+ job_t *j = job;
+
+ if (job != NULL) {
+- papi_attribute_t **(*f)();
++ papi_attribute_t **(*f)(papi_job_t*);
+
+- f = (papi_attribute_t **(*)())psm_sym(j->svc,
++ f = (papi_attribute_t **(*)(papi_job_t*))psm_sym(j->svc,
+ "papiJobGetAttributeList");
+ if (f != NULL)
+ result = f(j->job);
+@@ -62,9 +62,9 @@
+ job_t *j = job;
+
+ if (job != NULL) {
+- char *(*f)();
++ char *(*f)(papi_job_t*);
+
+- f = (char *(*)())psm_sym(j->svc, "papiJobGetPrinterName");
++ f = (char *(*)(papi_job_t*))psm_sym(j->svc, "papiJobGetPrinterName");
+ if (f != NULL)
+ result = f(j->job);
+ }
+@@ -79,9 +79,9 @@
+ job_t *j = job;
+
+ if (job != NULL) {
+- int32_t (*f)();
++ int32_t (*f)(papi_job_t*);
+
+- f = (int32_t (*)())psm_sym(j->svc, "papiJobGetId");
++ f = (int32_t (*)(papi_job_t*))psm_sym(j->svc, "papiJobGetId");
+ if (f != NULL)
+ result = f(j->job);
+ }
+@@ -96,9 +96,9 @@
+ job_t *j = job;
+
+ if (job != NULL) {
+- papi_job_ticket_t *(*f)();
++ papi_job_ticket_t *(*f)(papi_job_t*);
+
+- f = (papi_job_ticket_t *(*)())psm_sym(j->svc,
++ f = (papi_job_ticket_t *(*)(papi_job_t*))psm_sym(j->svc,
+ "papiJobGetJobTicket");
+ if (f != NULL)
+ result = f(j->job);
+@@ -117,7 +117,7 @@
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+ job_t *j = NULL;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, papi_attribute_t**, papi_job_ticket_t*, char**, papi_job_t**);
+
+ if ((svc == NULL) || (printer == NULL) || (files == NULL) ||
+ (job == NULL))
+@@ -130,7 +130,7 @@
+ return (PAPI_TEMPORARY_ERROR);
+
+ j->svc = svc;
+- f = (papi_status_t (*)())psm_sym(j->svc, function);
++ f = (papi_status_t (*)(void*, char*, papi_attribute_t**, papi_job_ticket_t*, char**, papi_job_t**))psm_sym(j->svc, function);
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, job_attributes,
+ job_ticket, files, &j->job);
+@@ -175,7 +175,7 @@
+ {
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, papi_attribute_t**, papi_job_ticket_t*, papi_stream_t*);
+
+ if ((svc == NULL) || (printer == NULL) || (stream == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -183,7 +183,7 @@
+ if ((result = service_connect(svc, printer)) != PAPI_OK)
+ return (result);
+
+- f = (papi_status_t (*)())psm_sym(svc, "papiJobStreamOpen");
++ f = (papi_status_t (*)(void*, char*, papi_attribute_t**, papi_job_ticket_t*, papi_stream_t*))psm_sym(svc, "papiJobStreamOpen");
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, job_attributes,
+ job_ticket, stream);
+@@ -197,13 +197,13 @@
+ {
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, papi_stream_t, void*, size_t);
+
+ if ((svc == NULL) || (stream == NULL) || (buffer == NULL) ||
+ (buflen == 0))
+ return (PAPI_BAD_ARGUMENT);
+
+- f = (papi_status_t (*)())psm_sym(svc, "papiJobStreamWrite");
++ f = (papi_status_t (*)(void*, papi_stream_t, void*, size_t))psm_sym(svc, "papiJobStreamWrite");
+ if (f != NULL)
+ result = f(svc->svc_handle, stream, buffer, buflen);
+
+@@ -216,7 +216,7 @@
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+ job_t *j = NULL;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, papi_stream_t, papi_job_t**);
+
+ if ((svc == NULL) || (stream == NULL) || (job == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -225,7 +225,7 @@
+ return (PAPI_TEMPORARY_ERROR);
+
+ j->svc = svc;
+- f = (papi_status_t (*)())psm_sym(j->svc, "papiJobStreamClose");
++ f = (papi_status_t (*)(void*, papi_stream_t, papi_job_t**))psm_sym(j->svc, "papiJobStreamClose");
+ if (f != NULL)
+ result = f(svc->svc_handle, stream, &j->job);
+
+@@ -239,7 +239,7 @@
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+ job_t *j = NULL;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, int32_t, char**, papi_job_t**);
+
+ if ((svc == NULL) || (printer == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -251,7 +251,7 @@
+ return (PAPI_TEMPORARY_ERROR);
+
+ j->svc = svc;
+- f = (papi_status_t (*)())psm_sym(j->svc, "papiJobQuery");
++ f = (papi_status_t (*)(void*, char*, int32_t, char**, papi_job_t**))psm_sym(j->svc, "papiJobQuery");
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, job_id,
+ requested_attrs, &j->job);
+@@ -265,7 +265,7 @@
+ {
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, int32_t, char*);
+
+ if ((svc == NULL) || (printer == NULL) || (job_id < 0))
+ return (PAPI_BAD_ARGUMENT);
+@@ -273,7 +273,7 @@
+ if ((result = service_connect(svc, printer)) != PAPI_OK)
+ return (result);
+
+- f = (papi_status_t (*)())psm_sym(svc, "papiJobMove");
++ f = (papi_status_t (*)(void*, char*, int32_t, char*))psm_sym(svc, "papiJobMove");
+ if (f != NULL) {
+ papi_attribute_t **attrs = getprinterbyname(destination, NULL);
+
+@@ -293,7 +293,7 @@
+ {
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, int32_t);
+
+ if ((svc == NULL) || (printer == NULL) || (job_id < 0))
+ return (PAPI_BAD_ARGUMENT);
+@@ -301,7 +301,7 @@
+ if ((result = service_connect(svc, printer)) != PAPI_OK)
+ return (result);
+
+- f = (papi_status_t (*)())psm_sym(svc, function);
++ f = (papi_status_t (*)(void*, char*, int32_t))psm_sym(svc, function);
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, job_id);
+
+@@ -357,7 +357,7 @@
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+ job_t *j = NULL;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, int32_t, papi_attribute_t**, papi_job_t**);
+
+ if ((svc == NULL) || (printer == NULL) || (job_id < 0) ||
+ (attributes == NULL))
+@@ -370,7 +370,7 @@
+ return (PAPI_TEMPORARY_ERROR);
+
+ j->svc = svc;
+- f = (papi_status_t (*)())psm_sym(j->svc, "papiJobModify");
++ f = (papi_status_t (*)(void*, char*, int32_t, papi_attribute_t**, papi_job_t**))psm_sym(j->svc, "papiJobModify");
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, job_id, attributes,
+ &j->job);
+@@ -391,7 +391,7 @@
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+ job_t *j = NULL;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, papi_attribute_t**, papi_job_ticket_t*, papi_job_t**);
+
+ if ((svc == NULL) || (printer == NULL) || (job == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -403,7 +403,7 @@
+ return (PAPI_TEMPORARY_ERROR);
+
+ j->svc = svc;
+- f = (papi_status_t (*)())psm_sym(j->svc, "papiJobCreate");
++ f = (papi_status_t (*)(void*, char*, papi_attribute_t**, papi_job_ticket_t*, papi_job_t**))psm_sym(j->svc, "papiJobCreate");
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, job_attributes,
+ job_ticket, &j->job);
+@@ -417,7 +417,7 @@
+ {
+ papi_status_t result = PAPI_INTERNAL_ERROR;
+ service_t *svc = handle;
+- papi_status_t (*f)();
++ papi_status_t (*f)(void*, char*, int32_t, papi_stream_t*);
+
+ if ((svc == NULL) || (printer == NULL))
+ return (PAPI_BAD_ARGUMENT);
+@@ -425,7 +425,7 @@
+ if ((result = service_connect(svc, printer)) != PAPI_OK)
+ return (result);
+
+- f = (papi_status_t (*)())psm_sym(svc, "papiJobStreamAdd");
++ f = (papi_status_t (*)(void*, char*, int32_t, papi_stream_t*))psm_sym(svc, "papiJobStreamAdd");
+ if (f != NULL)
+ result = f(svc->svc_handle, svc->name, id, stream);
+
+--- papi-1.0_beta/source/libpapi-dynamic/nss.c.orig 2006-02-26 06:37:43.000000000 +0100
++++ papi-1.0_beta/source/libpapi-dynamic/nss.c 2026-03-23 21:02:32.394350895 +0100
+@@ -25,6 +25,12 @@
+ #include <sys/systeminfo.h>
+ #endif
+
++#ifdef NSS_EMULATION
++void emul_setprinterentry(int stayopen);
++void emul_endprinterentry();
++int emul_getprinterentry_r(char *buffer, size_t buflen);
++int emul_getprinterbyname_r(const char *name, char *buffer, size_t buflen);
++#endif
+
+ static char *
+ bsdaddr_to_uri(char *bsdaddr)
+@@ -248,7 +254,7 @@
+ if (key != NULL) {
+ papi_attribute_t **use_attrs = getprinterbyname(key, NULL);
+
+- list_concatenate(&list, use_attrs);
++ list_concatenate((void***)&list, (void**)use_attrs);
+ }
+
+ fill_printer_uri_supported(&list);
+--- papi-1.0_beta/source/libpapi-dynamic/nss/nss-emulation.c.orig 2006-03-02 07:31:36.000000000 +0100
++++ papi-1.0_beta/source/libpapi-dynamic/nss/nss-emulation.c 2026-03-23 21:08:20.069642129 +0100
+@@ -29,6 +29,7 @@
+
+ static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+ static char **source_list = NULL;
++int list_append(void ***list, void *item);
+
+
+ static char **
+@@ -56,7 +57,7 @@
+ if (strcmp(tmp, DB) == 0) {
+ while ((tmp = strtok_r(NULL, ":\t\n ",
+ &iter)) != NULL)
+- list_append(&source_list,
++ list_append((void***)&source_list,
+ strdup(tmp));
+ break;
+ }
+@@ -120,7 +121,7 @@
+ while (*list != NULL) {
+ void (*fpt)();
+
+- if ((fpt = (void (*)(int))find_func(*list, "endprinterentry")) != NULL)
++ if ((fpt = (void (*)())find_func(*list, "endprinterentry")) != NULL)
+ (*fpt)();
+ list++;
+ }
+@@ -138,7 +139,7 @@
+ nss_status_t (*fpt)(char *, size_t, int *);
+ int err = 0;
+
+- if ((fpt = (nss_status_t (*)(char *, size_t))find_func(*list, "getprinterentry_r")) != NULL)
++ if ((fpt = (nss_status_t (*)(char *, size_t, int*))find_func(*list, "getprinterentry_r")) != NULL)
+ rc = (*fpt)(buffer, buflen, &err);
+ list++;
+ }
+--- papi-1.0_beta/source/libpapi-lpd/lpd-port.c.orig 2026-03-23 21:02:47.261101282 +0100
++++ papi-1.0_beta/source/libpapi-lpd/lpd-port.c 2026-03-23 21:13:04.894580353 +0100
+@@ -93,7 +93,7 @@
+ #else
+ struct sockaddr_in sin;
+ #endif
+- static void (*old_handler)();
++ static void (*old_handler)(int);
+ int err,
+ error_num;
+ unsigned timo = 1;
+--- papi-1.0_beta/source/libpapi-lpd/lpd-misc.c.orig 2026-03-23 21:02:47.261101282 +0100
++++ papi-1.0_beta/source/libpapi-lpd/lpd-misc.c 2026-03-23 21:14:58.321886198 +0100
+@@ -27,7 +27,7 @@
+ char tmp;
+ int count = 0;
+
+- memset(buf, NULL, len);
++ memset(buf, 0, len);
+ while ((count < len) && (read(fd, &tmp, 1) > 0))
+ if ((buf[count++] = tmp) == '\n') break;
+
+--- papi-1.0_beta/source/libpapi-lpd/job.c.orig 2005-10-31 19:56:45.000000000 +0100
++++ papi-1.0_beta/source/libpapi-lpd/job.c 2026-03-23 21:15:41.672130481 +0100
+@@ -7,6 +7,7 @@
+
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <string.h>
+ #include <strings.h>
+ #include <errno.h>
+ #include <unistd.h>
+--- papi-1.0_beta/source/libpapi-lpd/lpd-job.c.orig 2005-02-26 07:58:42.000000000 +0100
++++ papi-1.0_beta/source/libpapi-lpd/lpd-job.c 2026-03-23 21:17:30.956079643 +0100
+@@ -8,6 +8,7 @@
+ #define __EXTENSIONS__ /* for strtok_r() */
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <unistd.h>
+ #include <errno.h>
+ #include <limits.h>
+@@ -125,7 +126,7 @@
+ papi_status_t status = PAPI_OK;
+ char *s;
+ int integer;
+- char bool;
++ char boolv;
+ char host[BUFSIZ];
+ char *user = "nobody";
+ uid_t uid = getuid();
+@@ -180,12 +181,12 @@
+ }
+
+ /* User to mail when job is done - lpr -m */
+- bool = PAPI_FALSE;
+- papiAttributeListGetBoolean(attributes, NULL, "rfc-1179-mail", &bool);
+- if (bool == PAPI_TRUE) {
++ boolv = PAPI_FALSE;
++ papiAttributeListGetBoolean(attributes, NULL, "rfc-1179-mail", &boolv);
++ if (boolv == PAPI_TRUE) {
+ add_lpd_control_line(metadata, 'M', user);
+ papiAttributeListAddBoolean(used, PAPI_ATTR_EXCL,
+- "rfc-1179-mail", bool);
++ "rfc-1179-mail", boolv);
+ }
+
+ /* Title for pr */
+--- papi-1.0_beta/source/libpapi-lpd/lpd-cancel.c.orig 2005-02-26 07:58:42.000000000 +0100
++++ papi-1.0_beta/source/libpapi-lpd/lpd-cancel.c 2026-03-23 21:18:07.696286679 +0100
+@@ -86,7 +86,7 @@
+ if ((job = (job_t *)calloc(1, (sizeof (*job))))
+ != NULL) {
+ job->attributes = attributes;
+- list_append(jobs, job);
++ list_append((void***)jobs, job);
+ } else
+ papiAttributeListFree(attributes);
+ } else if (strstr(buf, "permission denied") != NULL)
+--- papi-1.0_beta/source/libpapi-lpd/lpd-query.c.orig 2005-10-01 07:49:10.000000000 +0200
++++ papi-1.0_beta/source/libpapi-lpd/lpd-query.c 2026-03-23 21:19:52.546877526 +0100
+@@ -82,7 +82,7 @@
+ do { q--; } while (isdigit(*q) != 0);
+
+ /* seperate the name and size */
+- *q = NULL;
++ *q = '\0';
+ q++;
+
+ size = atoi(q);
+@@ -116,7 +116,7 @@
+
+ do {
+ parse_lpd_job_entry(svc, fd, &job);
+- list_append(&svc->cache->jobs, job);
++ list_append((void***)&svc->cache->jobs, job);
+ } while (job != NULL);
+
+ }
+--- papi-1.0_beta/source/libpapi-ipp/http-core/http-addr.c.orig 2005-08-29 07:07:20.000000000 +0200
++++ papi-1.0_beta/source/libpapi-ipp/http-core/http-addr.c 2026-03-23 21:20:23.703719765 +0100
+@@ -37,6 +37,7 @@
+ * Include necessary headers...
+ */
+
++#include <ctype.h>
+ #include "http.h"
+ #include "debug.h"
+ #include "string.h"
+--- papi-1.0_beta/source/libpapi-ipp/http-core/md5passwd.c.orig 2005-08-29 07:07:20.000000000 +0200
++++ papi-1.0_beta/source/libpapi-ipp/http-core/md5passwd.c 2026-03-23 21:20:50.913873098 +0100
+@@ -35,6 +35,7 @@
+ * Include necessary headers...
+ */
+
++#include <stdio.h>
+ #include "http.h"
+ #include "string.h"
+
+--- papi-1.0_beta/source/libipp-listener/ipp-listener.c.orig 2006-02-26 08:40:38.000000000 +0100
++++ papi-1.0_beta/source/libipp-listener/ipp-listener.c 2026-03-23 21:23:10.864661739 +0100
+@@ -54,6 +54,8 @@
+ extern ipp_handler_t cups_reject_jobs;
+ extern ipp_handler_t cups_move_job;
+
++papi_status_t papiServiceSetPeer(papi_service_t handle, int fd);
++
+ /* ARGSUSED0 */
+ static papi_status_t
+ default_handler(papi_service_t svc, papi_attribute_t **request,
+--- papi-1.0_beta/source/libipp-listener/common.c.orig 2006-02-26 08:40:38.000000000 +0100
++++ papi-1.0_beta/source/libipp-listener/common.c 2026-03-23 21:24:21.631727188 +0100
+@@ -74,7 +74,7 @@
+ } else {
+ *printer = job;
+ if ((job = strrchr(*printer, '/')) != NULL) {
+- *job = NULL;
++ *job = '\0';
+ *id = atoi(++job);
+ }
+ }
+@@ -97,7 +97,7 @@
+ result == PAPI_OK;
+ result = papiAttributeListGetString(attributes, &iterator,
+ NULL, &value))
+- list_append(values, value);
++ list_append((void***)values, value);
+ }
+
+ void
+--- papi-1.0_beta/source/libipp-listener/create-job.c.orig 2006-02-25 07:10:20.000000000 +0100
++++ papi-1.0_beta/source/libipp-listener/create-job.c 2026-03-23 21:25:26.918761755 +0100
+@@ -11,6 +11,10 @@
+ #include <ipp.h>
+ #include <ipp-listener.h>
+
++papi_status_t papiJobCreate(papi_service_t handle, char *printer,
++ papi_attribute_t **job_attributes,
++ papi_job_ticket_t *job_ticket, papi_job_t *job);
++
+ papi_status_t
+ ipp_create_job(papi_service_t svc, papi_attribute_t **request,
+ papi_attribute_t ***response)
+--- papi-1.0_beta/source/libipp-listener/send-document.c.orig 2006-02-25 07:10:20.000000000 +0100
++++ papi-1.0_beta/source/libipp-listener/send-document.c 2026-03-23 21:29:27.466786300 +0100
+@@ -10,6 +10,11 @@
+ #include <ipp.h>
+ #include <ipp-listener.h>
+
++
++papi_status_t papiJobStreamAdd(papi_service_t handle, char *printer, int32_t id,
++ papi_stream_t *stream);
++papi_status_t papiJobCommit(papi_service_t handle, char *printer, int32_t job_id);
++
+ /*
+ * When the PAPI supports papiJobCreate(), papiJobStreamAdd() and
+ * papiJobClose(), this will be much cleaner and more efficient, but in the
+--- papi-1.0_beta/source/bsd-sysv-commands/common.c.orig 2006-02-15 22:24:20.000000000 +0100
++++ papi-1.0_beta/source/bsd-sysv-commands/common.c 2026-03-23 21:35:45.198919210 +0100
+@@ -368,7 +368,7 @@
+ status == PAPI_OK;
+ status = papiAttributeListGetString(attributes,
+ &iter, NULL, &value))
+- list_append(&result, strdup(value));
++ list_append((void***)&result, strdup(value));
+ }
+ papiPrinterFree(printer);
+ }
+@@ -396,7 +396,7 @@
+ (void) papiAttributeListGetString(attributes, NULL,
+ "printer-name", &name);
+ if ((name != NULL) && (strcmp(name, "_default") != 0))
+- list_append(&result, strdup(name));
++ list_append((void***)&result, strdup(name));
+ }
+ papiPrinterListFree(printers);
+ }
+--- papi-1.0_beta/source/bsd-sysv-commands/in.lpd.c.orig 2006-01-28 08:02:04.000000000 +0100
++++ papi-1.0_beta/source/bsd-sysv-commands/in.lpd.c 2026-03-23 21:37:10.739402224 +0100
+@@ -6,11 +6,13 @@
+ #pragma ident "$Id: in.lpd.c,v 1.3 2006/01/28 07:02:04 njacobs Exp $"
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <stdarg.h>
+ #include <string.h>
+ #include <errno.h>
+ #include <syslog.h>
+ #include <libintl.h>
++#include <unistd.h>
+
+ #include <papi.h>
+ #include "common.h"
+--- papi-1.0_beta/source/mod_ipp/mod_ipp.c.orig 2026-03-23 21:02:47.327768324 +0100
++++ papi-1.0_beta/source/mod_ipp/mod_ipp.c 2026-03-23 23:19:10.810417029 +0100
+@@ -152,7 +152,11 @@
+ #endif
+ }
+
+-void _log_rerror(const char * file, int line, int level, const request_rec *r,
++void _log_rerror(const char * file, int line,
++#ifdef APLOG_MODULE_INDEX
++ int module_index,
++#endif
++ int level, const request_rec *r,
+ const char *fmt, ...)
+ {
+ va_list args;
+@@ -170,7 +174,11 @@
+ va_end(args);
+
+ #ifdef APACHE2
+- ap_log_rerror(file, line, 0, level, APR_SUCCESS, r, "%s", message);
++ ap_log_rerror(file, line,
++#ifdef APLOG_MODULE_INDEX
++ module_index,
++#endif
++ level, APR_SUCCESS, r, "%s", message);
+ #else
+ ap_log_rerror(file, line, level, r, message);
+ #endif
+@@ -218,7 +226,7 @@
+ status = ipp_read_message(read_data, r, &request, IPP_TYPE_REQUEST);
+
+ if (status != PAPI_OK)
+- _log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ _log_rerror(APLOG_MARK, APLOG_ERR, r,
+ "read failed: %s\n", papiStatusString(status));
+ #ifdef DEBUG
+ papiAttributeListPrint(stderr, request, "request (%d) ", getpid());
+@@ -279,7 +287,7 @@
+ status = ipp_process_request(request, &response, read_data, r);
+ if (status != PAPI_OK) {
+ errno = 0;
+- _log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ _log_rerror(APLOG_MARK, APLOG_ERR, r,
+ "request failed: %s\n", papiStatusString(status));
+ discard_data(r);
+ }
+@@ -306,7 +314,7 @@
+
+ status = ipp_write_message(write_data, r, response);
+ if (status != PAPI_OK)
+- _log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ _log_rerror(APLOG_MARK, APLOG_ERR, r,
+ "write failed: %s\n", papiStatusString(status));
+ #ifdef DEBUG
+ fprintf(stderr, "write result: %s\n", papiStatusString(status));
+@@ -319,7 +327,7 @@
+ #ifndef APACHE2
+ ap_kill_timeout(r);
+ if (ap_rflush(r) < 0)
+- _log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
++ _log_rerror(APLOG_MARK, APLOG_ERR, r,
+ "flush failed, response may not have been sent");
+ #endif
+
+@@ -472,7 +480,7 @@
+ /* Need to make sure we don't get directory listings by accident */
+ ap_hook_handler(ipp_handler, NULL, modules, APR_HOOK_MIDDLE);
+ ap_hook_default_port(ipp_port, NULL, NULL, APR_HOOK_MIDDLE);
+- ap_hook_http_method(ipp_method, NULL, NULL, APR_HOOK_MIDDLE);
++ ap_hook_http_scheme(ipp_method, NULL, NULL, APR_HOOK_MIDDLE);
+ }
+
+ module AP_MODULE_DECLARE_DATA ipp_module = {
+--- papi-1.0_beta/source/examples/print-test.c.orig 2005-11-10 18:50:58.000000000 +0100
++++ papi-1.0_beta/source/examples/print-test.c 2026-03-23 23:27:32.589859510 +0100
+@@ -15,6 +15,12 @@
+ #include <errno.h>
+ #include <papi.h>
+
++papi_status_t papiJobStreamAdd(papi_service_t handle, char *printer, int32_t id,
++ papi_stream_t *stream);
++papi_status_t papiJobCreate(papi_service_t handle, char *printer,
++ papi_attribute_t **job_attributes,
++ papi_job_ticket_t *job_ticket, papi_job_t *job);
++
+ static void
+ usage(char *program)
+ {
+@@ -74,7 +80,7 @@
+ papi_attribute_t **list = NULL;
+ papi_encryption_t encryption = PAPI_ENCRYPT_NEVER;
+ papi_job_t job = NULL;
+- papi_stream_t *stream = NULL;
++ papi_stream_t stream;
+ int fd;
+
+ printf("add_file(%s, %d, %s, %d)\n", printer, id, file, dump);
+--- papi-1.0_beta/source/examples/printer-query.c.orig 2005-10-31 19:53:11.000000000 +0100
++++ papi-1.0_beta/source/examples/printer-query.c 2026-03-23 23:28:15.123427429 +0100
+@@ -60,7 +60,7 @@
+ encryption = PAPI_ENCRYPT_ALWAYS;
+ break;
+ case 'o': /* requested attribute */
+- list_append(&requested, optarg);
++ list_append((void***)&requested, optarg);
+ break;
+ case 's': /* type */
+ service = optarg;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/papi.git/commitdiff/8d1396137446c55afb38bfe38095bac1416001ab
More information about the pld-cvs-commit
mailing list