Fix for 64 bits exec.

This commit is contained in:
espie 2002-11-23 20:32:21 +00:00
parent 981f63a9a5
commit 79e05d02dc

View File

@ -0,0 +1,44 @@
$OpenBSD: patch-src_kernel_qprinter_unix_cpp,v 1.1 2002/11/23 20:32:21 espie Exp $
--- src/kernel/qprinter_unix.cpp.orig Sat Nov 23 21:25:15 2002
+++ src/kernel/qprinter_unix.cpp Sat Nov 23 21:25:52 2002
@@ -349,9 +349,9 @@ bool QPrinter::cmd( int c, QPainter *pai
// try to replace this process with "true" - this prevents
// global destructors from being called (that could possibly
// do wrong things to the parent process)
- (void)execlp("true", "true", 0);
- (void)execl("/bin/true", "true", 0);
- (void)execl("/usr/bin/true", "true", 0);
+ (void)execlp("true", "true", (void*)0);
+ (void)execl("/bin/true", "true", (void*)0);
+ (void)execl("/usr/bin/true", "true", (void*)0);
::exit( 0 );
}
dup2( fds[0], 0 );
@@ -364,7 +364,7 @@ bool QPrinter::cmd( int c, QPainter *pai
else
pr.prepend( QString::fromLatin1( "-P" ) );
(void)execlp( print_prog.ascii(), print_prog.ascii(),
- pr.ascii(), 0 );
+ pr.ascii(), (void*)0 );
} else {
// if no print program has been specified, be smart
// about the option string too.
@@ -382,12 +382,12 @@ bool QPrinter::cmd( int c, QPainter *pai
QString::fromLatin1( "-d" ) );
lparg = lphack.ascii();
}
- (void)execlp( "lp", "lp", lparg, 0 );
- (void)execlp( "lpr", "lpr", lprarg, 0 );
- (void)execl( "/bin/lp", "lp", lparg, 0 );
- (void)execl( "/bin/lpr", "lpr", lprarg, 0 );
- (void)execl( "/usr/bin/lp", "lp", lparg, 0 );
- (void)execl( "/usr/bin/lpr", "lpr", lprarg, 0 );
+ (void)execlp( "lp", "lp", lparg, (void*)0 );
+ (void)execlp( "lpr", "lpr", lprarg, (void*)0 );
+ (void)execl( "/bin/lp", "lp", lparg, (void*)0 );
+ (void)execl( "/bin/lpr", "lpr", lprarg, (void*)0 );
+ (void)execl( "/usr/bin/lp", "lp", lparg, (void*)0 );
+ (void)execl( "/usr/bin/lpr", "lpr", lprarg, (void*)0 );
}
// if we couldn't exec anything, close the fd,
// wait for a second so the parent process (the