Add a couple of upstream patches from Abel Abraham Camarillo Ojeda to

fix some lpr usages.
This commit is contained in:
ajacoutot 2010-11-11 12:55:24 +00:00
parent 24e9c2575b
commit 017964acd5
3 changed files with 49 additions and 5 deletions

View File

@ -1,10 +1,12 @@
# $OpenBSD: Makefile,v 1.21 2010/10/18 21:25:08 espie Exp $
# $OpenBSD: Makefile,v 1.22 2010/11/11 12:55:24 ajacoutot Exp $
COMMENT= Foomatic PPD print filters
DISTNAME= foomatic-filters-4.0.5
CATEGORIES= print
REVISION= 0
HOMEPAGE= http://www.linuxfoundation.org/en/OpenPrinting/Database/Foomatic
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>

View File

@ -0,0 +1,18 @@
$OpenBSD: patch-fileconverter_c,v 1.1 2010/11/11 12:55:24 ajacoutot Exp $
Upstream r241.
--- fileconverter.c.orig Thu Nov 11 13:47:02 2010
+++ fileconverter.c Thu Nov 11 13:46:20 2010
@@ -49,8 +49,10 @@ void set_fileconverter(const char *fc)
{
int i;
for (i = 0; fileconverters[i][0]; i++) {
- if (!strcmp(fc, fileconverters[i][0]))
+ if (!strcmp(fc, fileconverters[i][0])) {
strlcpy(fileconverter, fileconverters[i][1], PATH_MAX);
+ break;
+ }
}
if (!fileconverters[i][0])
strlcpy(fileconverter, fc, PATH_MAX);

View File

@ -1,7 +1,31 @@
$OpenBSD: patch-util_c,v 1.2 2010/08/22 06:56:25 ajacoutot Exp $
$OpenBSD: patch-util_c,v 1.3 2010/11/11 12:55:24 ajacoutot Exp $
Upstream r240.
--- util.c.orig Tue Aug 10 12:08:04 2010
+++ util.c Sun Aug 22 07:15:52 2010
@@ -162,6 +162,7 @@ strcasestr (const char *haystack, const char *needle)
+++ util.c Thu Nov 11 13:46:24 2010
@@ -39,14 +39,15 @@ const char * temp_dir()
if (!tmpdir)
{
- const char *dirs[] = { getenv("TMPDIR"), P_tmpdir, "/tmp", NULL };
- const char **dir;
+ const char *dirs[] = { getenv("TMPDIR"), P_tmpdir, "/tmp" };
+ int i;
- for (dir = dirs; *dir; dir++)
- if (access(*dir, W_OK) == 0) {
- tmpdir = *dir;
+ for (i = 0; i < (sizeof(dirs) / sizeof(dirs[0])); i++) {
+ if (access(dirs[i], W_OK) == 0) {
+ tmpdir = dirs[i];
break;
}
+ }
if (tmpdir)
{
_log("Storing temporary files in %s\n", tmpdir);
@@ -162,6 +163,7 @@ strcasestr (const char *haystack, const char *needle)
}
#endif
@ -9,7 +33,7 @@ $OpenBSD: patch-util_c,v 1.2 2010/08/22 06:56:25 ajacoutot Exp $
size_t strlcpy(char *dest, const char *src, size_t size)
{
char *pdest = dest;
@@ -201,6 +202,7 @@ size_t strlcat(char *dest, const char *src, size_t siz
@@ -201,6 +203,7 @@ size_t strlcat(char *dest, const char *src, size_t siz
return len + (psrc - src);
}