bug-texinfo
[Top][All Lists]
Advanced

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

Minor build fixes


From: Ken Brown
Subject: Minor build fixes
Date: Thu, 02 Oct 2014 12:46:06 -0400
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

I just took over as the Cygwin maintainer of Texinfo, and I bumped into a few (easily fixed) build problems. The first two exist in texinfo-5.2, and the rest only in the trunk.

1. The compiler produces lots of warnings about setmode being redefined. It would be simple to silence the warnings, but the real issue in my opinion is that Cygwin should be treated the same as Unix, so that there's no need for setmode at all:

Index: system.h
===================================================================
--- system.h    (revision 5852)
+++ system.h    (working copy)
@@ -119,6 +119,13 @@
     - text files can have their lines ended either with \n or with \r\n pairs;
    These are all parameterized here except the last, which is
    handled by the source code as appropriate (mostly, in info/).  */
+
+/* Cygwin is a Posix system even though it allows the use of O_BINARY.  */
+#ifdef __CYGWIN__
+# undef O_BINARY
+# define O_BINARY 0
+#endif
+
 #ifndef O_BINARY
 # ifdef _O_BINARY
 #  define O_BINARY _O_BINARY
@@ -152,23 +159,13 @@
 #  define HAVE_LONG_FILENAMES(dir)   (1)
 #  define NULL_DEVICE  "NUL"
 # endif  /* O_BINARY && !__MSDOS__ */
-# ifdef __CYGWIN__
-#  define DEFAULT_TMPDIR       "/tmp/"
-#  define PATH_SEP     ":"
-#  define STRIP_DOT_EXE        0
-#  undef NULL_DEVICE
-#  define NULL_DEVICE "/dev/null"
-#  define PIPE_USE_FORK        1
-# else  /* O_BINARY && !__CYGWIN__ */
-#  ifdef __MINGW32__
-#   define SET_SCREEN_SIZE_HELPER terminal_prep_terminal()
-#  endif  /* _WIN32 */
-#  define DEFAULT_TMPDIR       "c:/"
-#  define PATH_SEP     ";"
-#  define STRIP_DOT_EXE        1
-#  define PIPE_USE_FORK        0
-# endif /* O_BINARY && !__CYGWIN__ */
-  /* Back to any O_BINARY system.  */
+# ifdef __MINGW32__
+#  define SET_SCREEN_SIZE_HELPER terminal_prep_terminal()
+# endif  /* _WIN32 */
+# define DEFAULT_TMPDIR        "c:/"
+# define PATH_SEP      ";"
+# define STRIP_DOT_EXE 1
+# define PIPE_USE_FORK 0
 # define FILENAME_CMP  mbscasecmp
 # define FILENAME_CMPN mbsncasecmp
 # define FOPEN_RBIN    "rb"

2. The following patch provides the prototype for ioctl:

Index: info/termdep.h
===================================================================
--- info/termdep.h      (revision 5852)
+++ info/termdep.h      (working copy)
@@ -49,7 +49,7 @@
 #  endif /* !HAVE_TERMIO_H */
 #endif /* !HAVE_TERMIOS_H */

-#ifdef GWINSZ_IN_SYS_IOCTL
+#ifndef __MINGW32__
 #  include <sys/ioctl.h>
 #endif

3. The following is needed for linking, now that info/info-utils.c uses 
libiconv:

Index: info/Makefile.am
===================================================================
--- info/Makefile.am    (revision 5852)
+++ info/Makefile.am    (working copy)
@@ -27,7 +27,7 @@
   -DINFODIR=\"$(infodir)\"                      \
   -DINFODIR2=\"$(datadir)/info\"

-LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(TERMLIBS) $(LIBINTL)
+LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(TERMLIBS) $(LIBINTL) $(LIBICONV)

 EXTRA_DIST = README pcterm.c

4. info-utils.c wouldn't compile for me because Cygwin doesn't have the header <nl_types.h>. But this doesn't seem to be needed; the compilation worked if I just removed that include:

Index: info/info-utils.c
===================================================================
--- info/info-utils.c   (revision 5852)
+++ info/info-utils.c   (working copy)
@@ -24,7 +24,6 @@
 #include "info-utils.h"
 #include "tag.h"

-#include <nl_types.h>
 #include <langinfo.h>
 #if HAVE_ICONV
 # include <iconv.h>

5. Now that infokeys is no longer a standalone program, the attempt to create a man page for it fails. I assume the following is the right fix:

Index: man/Makefile.am
===================================================================
--- man/Makefile.am     (revision 5852)
+++ man/Makefile.am     (working copy)
@@ -18,7 +18,7 @@
 # These require the build in info/, thus can't do if we failed to find a
 # terminal library.
 if HAVE_TERMLIBS
-man_MANS += info.1 infokey.1
+man_MANS += info.1
 endif

 # These are hand-written.
@@ -76,9 +76,6 @@
                   $(common_mandeps)
        @name="read Info documents" && $(man_rule_bin)

-infokey.1: $(top_srcdir)/info/infokey.c $(common_mandeps)
-       @name="compile customizations for Info" && $(man_rule_bin)
-
 install-info.1: $(top_srcdir)/install-info/install-info.c \
                           $(common_mandeps)
        @name="update info/dir entries" && $(man_rule_bin)


Ken



reply via email to

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