Description: changes needed for Debian

Index: rlpr/src/client.c
===================================================================
--- rlpr.orig/src/client.c	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/client.c	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)client.c	1.2	99/10/29 meem"
-
 #include <sys/types.h>
 #include <unistd.h>
 #include <netinet/in.h>
@@ -164,7 +162,7 @@
 int
 client_open(int timeout)
 {
-    int			sin_size = sizeof (struct sockaddr_in);
+    socklen_t			sin_size = sizeof (struct sockaddr_in);
     struct sockaddr_in	sin_local;
     struct sockaddr_in	sin_dst;
     int			sock_fd;
Index: rlpr/src/rlprm.c
===================================================================
--- rlpr.orig/src/rlprm.c	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/rlprm.c	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)rlprm.c	1.1	99/09/16 meem"
-
 #include <sys/types.h>
 #include <errno.h>
 #include <pwd.h>
Index: rlpr/src/rlprrc.h
===================================================================
--- rlpr.orig/src/rlprrc.h	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/rlprrc.h	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)rlprrc.h	1.2	99/09/25 meem"
-
 #ifndef	RLPRRC_H
 #define	RLPRCC_H
 
Index: rlpr/src/rlprrc.c
===================================================================
--- rlpr.orig/src/rlprrc.c	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/rlprrc.c	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)rlprrc.c	1.3	99/10/29 meem"
-
 #include <string.h>
 #include <stdio.h>
 #include <lib.h>
Index: rlpr/src/component.c
===================================================================
--- rlpr.orig/src/component.c	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/component.c	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)component.c	1.2	99/10/29 meem"
-
 #include <sys/types.h>
 #include <stddef.h>		/* size_t */
 #include <getopt.h>
Index: rlpr/src/component.h
===================================================================
--- rlpr.orig/src/component.h	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/component.h	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)component.h	1.1	99/09/16 meem"
-
 #ifndef	COMPONENT_H
 #define	COMPONENT_H
 
Index: rlpr/src/client.h
===================================================================
--- rlpr.orig/src/client.h	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/client.h	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)client.h	1.1	99/09/16 meem"
-
 #ifndef	CLIENT_H
 #define	CLIENT_H
 
Index: rlpr/src/intl.h
===================================================================
--- rlpr.orig/src/intl.h	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/intl.h	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)intl.h	1.2	01/01/01 meem"
-
 #ifndef	INTL_H
 #define	INTL_H
 
Index: rlpr/src/rlprm.h
===================================================================
--- rlpr.orig/src/rlprm.h	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/rlprm.h	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)rlprm.h	1.1	99/09/16 meem"
-
 #ifndef	RLPRM_H
 #define	RLPRM_H
 
Index: rlpr/src/rlpq.c
===================================================================
--- rlpr.orig/src/rlpq.c	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/rlpq.c	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)rlpq.c	1.1	99/09/16 meem"
-
 #include <sys/types.h>
 #include <errno.h>
 #include <pwd.h>
Index: rlpr/src/rlprd.h
===================================================================
--- rlpr.orig/src/rlprd.h	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/rlprd.h	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)rlprd.h	1.1	99/09/16 meem"
-
 #ifndef	RLPRD_H
 #define	RLPRD_H
 
Index: rlpr/src/util.c
===================================================================
--- rlpr.orig/src/util.c	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/util.c	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)util.c	1.2	99/10/28 meem"
-
 #include <sys/types.h>
 #include <config.h>
 #include <stddef.h>
@@ -413,7 +411,7 @@
     int			retval;
     int			orig_flags;
     int			error = 0;
-    size_t		error_len = sizeof (int);
+    socklen_t	error_len = sizeof (int);
     fd_set		fds;
     struct timeval	tv;
 
Index: rlpr/src/rfc1179.h
===================================================================
--- rlpr.orig/src/rfc1179.h	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/rfc1179.h	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)rfc1179.h	1.1	99/09/16 meem"
-
 #ifndef	RFC1179_H
 #define	RFC1179_H
 
Index: rlpr/src/rlpq.h
===================================================================
--- rlpr.orig/src/rlpq.h	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/rlpq.h	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)rlpq.h	1.1	99/09/16 meem"
-
 #ifndef	RLPQ_H
 #define	RLPQ_H
 
Index: rlpr/src/rlpr.c
===================================================================
--- rlpr.orig/src/rlpr.c	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/rlpr.c	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)rlpr.c	1.2	01/01/01 meem"
-
 #include <config.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -551,16 +549,12 @@
      * handle any extensions
      */
 
-    switch (component_get_extension()) {
-
-    case R_EXT_HPUX:
+    if(component_get_extension() == R_EXT_HPUX) {
+		if (rlpr_rlpr->write_back)
+			controlf_add(cf_fd, 'R', rlpr_rlpr->user, 0);
 
-	if (rlpr_rlpr->write_back)
-	    controlf_add(cf_fd, 'R', rlpr_rlpr->user, 0);
-
-	controlf_add(cf_fd, 'A', rlpr_rlpr->priority, 0);
-	controlf_add(cf_fd, 'O', rlpr_rlpr->options, 0);
-	break;
+		controlf_add(cf_fd, 'A', rlpr_rlpr->priority, 0);
+		controlf_add(cf_fd, 'O', rlpr_rlpr->options, 0);
     }
 }
 
Index: rlpr/src/msg.c
===================================================================
--- rlpr.orig/src/msg.c	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/msg.c	2023-10-06 08:15:25.183822892 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)msg.c	1.3	04/09/07 meem"
-
 #include <string.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -163,7 +161,7 @@
 	char 	   buf[1024];
 
 	if (errno != 0) {
-	    sprintf(buf, "%s: %s", _(format), strerror(errno));
+	    snprintf(buf, sizeof(buf), "%s: %s", _(format), strerror(errno));
 	    format = buf;
 	} else {
 	    format = _(format);
Index: rlpr/src/msg.h
===================================================================
--- rlpr.orig/src/msg.h	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/msg.h	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)msg.h	1.1	99/09/16 meem"
-
 #ifndef	MSG_H
 #define	MSG_H
 
Index: rlpr/src/util.h
===================================================================
--- rlpr.orig/src/util.h	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/util.h	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)util.h	1.1	99/09/16 meem"
-
 #ifndef	UTIL_H
 #define	UTIL_H
 
Index: rlpr/src/rlpr.h
===================================================================
--- rlpr.orig/src/rlpr.h	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/rlpr.h	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)rlpr.h	1.1	99/09/16 meem"
-
 #ifndef	RLPR_H
 #define	RLPR_H
 
Index: rlpr/src/rlprd.c
===================================================================
--- rlpr.orig/src/rlprd.c	2023-10-06 08:15:15.227822918 +0200
+++ rlpr/src/rlprd.c	2023-10-06 08:15:15.227822918 +0200
@@ -12,8 +12,6 @@
  * General Public License for more details.
  */
 
-#pragma ident "@(#)rlprd.c	1.1	99/09/16 meem"
-
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/wait.h>
@@ -67,7 +65,8 @@
     struct component   *comp;
     int			listen_fd, client_fd;
     struct sockaddr_in	sin_rlprd, sin_client;
-    int			unused, on = 1;
+	socklen_t	unused;
+    int			on = 1;
 
     program_name = argv[0];
     toggle_root();
@@ -271,7 +270,8 @@
 static int
 register_sigchld(void)
 {
-    struct sigaction	sa = { 0 };
+    struct sigaction	sa;
+    memset(&sa, 0, sizeof(sa));
 
     sa.sa_handler = catch_sigchld;
 #ifdef	SA_RESTART
