bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] posix_openpt: new module


From: Bruno Haible
Subject: Re: [PATCH] posix_openpt: new module
Date: Wed, 19 Oct 2011 11:50:21 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Hi Eric,

This module fails to build on several platforms.

On AIX 5.1:

test-posix_openpt.c:24: error: 'posix_openpt' undeclared here (not in a 
function)
test-posix_openpt.c: In function 'main':
test-posix_openpt.c:45: warning: implicit declaration of function 'posix_openpt'
make: 1254-004 The error code from the last command is 1.

On Cygwin 1.5:

test-posix_openpt.c:24: error: `posix_openpt' undeclared here (not in a 
function)
test-posix_openpt.c: In function `main':
test-posix_openpt.c:45: warning: implicit declaration of function `posix_openpt'
make[3]: *** [test-posix_openpt.o] Error 1

On HP-UX 11.23:

cc: "test-posix_openpt.c", line 24: error 1588: "posix_openpt" undefined.
cc: "test-posix_openpt.c", line 24: error 1521: Incorrect initialization.
cc: "test-posix_openpt.c", line 45: error 1589: "posix_openpt" is not a 
function. 
gmake[4]: *** [test-posix_openpt.o] Error 1

On IRIX 6.5:

test-posix_openpt.c:24: error: 'posix_openpt' undeclared here (not in a 
function)
test-posix_openpt.c: In function 'main':
test-posix_openpt.c:45: warning: implicit declaration of function 'posix_openpt'
*** Error code 1 (bu21)

On OpenBSD 4.9:

test-posix_openpt.c:24: error: 'posix_openpt' undeclared here (not in a 
function)
test-posix_openpt.c: In function 'main':
test-posix_openpt.c:45: warning: implicit declaration of function 'posix_openpt'
*** Error code 1

On Solaris 9:

"test-posix_openpt.c", line 24: undefined symbol: posix_openpt
"test-posix_openpt.c", line 24: warning: improper pointer/integer combination: 
op "="
"test-posix_openpt.c", line 24: non-constant initializer: op "NAME"
"test-posix_openpt.c", line 45: function designator is not of function type
"test-posix_openpt.c", line 45: warning: improper pointer/integer combination: 
op "="
"test-posix_openpt.c", line 76: cannot recover from previous errors
cc: acomp failed for test-posix_openpt.c
*** Error code 2


This should fix it. Plus some documentation updates.


2011-10-19  Bruno Haible  <address@hidden>

        posix_openpt: Fix compilation error.
        * lib/posix_openpt.c (posix_openpt): Renamed from posix_openpty.
        * doc/posix-functions/posix_openpt.texi: Mention ENOENT error code.
        Mention the openpty module as an alternative.

--- doc/posix-functions/posix_openpt.texi.orig  Wed Oct 19 11:48:23 2011
+++ doc/posix-functions/posix_openpt.texi       Wed Oct 19 11:44:01 2011
@@ -12,9 +12,15 @@
 This function is missing on some platforms:
 MacOS X 10.3, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 
5.1,
 Solaris 9, Cygwin 1.5.x, mingw, MSVC 9, Interix 3.5, BeOS.
-However, the replacement may fail with ENOSYS on some platforms.
+However, the replacement may fail with @code{ENOSYS} or @code{ENOENT} on
+some platforms.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
 @end itemize
+
+Note that when using this function to open the master side of a
+pseudo-terminal, you still need platform dependent code to open the
+corresponding slave side.  The Gnulib module @code{openpty} provides
+an easy-to-use API that does both at once.
--- lib/posix_openpt.c.orig     Wed Oct 19 11:48:23 2011
+++ lib/posix_openpt.c  Wed Oct 19 11:44:01 2011
@@ -23,7 +23,7 @@
 #include <errno.h>
 
 int
-posix_openpty (int flags)
+posix_openpt (int flags)
 {
   int master;
 
-- 
In memoriam Jerzy Popiełuszko <http://en.wikipedia.org/wiki/Jerzy_Popiełuszko>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]