[Pkg-electronics-commits] [gplcver] 17/18: Switch to 3.0 (quilt) source format

أحمد المحمودي (Ahmed El-Mahmoudy) aelmahmoudy at sabily.org
Thu Mar 26 12:16:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

aelmahmoudy-guest pushed a commit to branch master
in repository gplcver.

commit 86b8b9986efc89f4e54a3d23affa4f588501a0ec
Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy at users.sourceforge.net>
Date:   Thu Mar 26 14:04:50 2015 +0200

    Switch to 3.0 (quilt) source format
    
    Move changes to patches: autoconf.diff, fix_sparc_ftbfs.diff &
    string_format_security.diff
---
 Makefile.am                                |  11 -
 configure.ac                               |  60 ----
 debian/patches/autoconf.diff               | 425 +++++++++++++++++++++++++++++
 debian/patches/fix_sparc_ftbfs.diff        | 124 +++++++++
 debian/patches/series                      |   3 +
 debian/patches/string_format_security.diff |  15 +
 debian/source/format                       |   1 +
 src/Makefile.am                            |  13 -
 src/config.h.in                            | 165 -----------
 src/cver.c                                 |   2 +-
 src/v.h                                    |  25 +-
 src/v_cnv.c                                |   6 +-
 src/v_dbg.c                                |   5 +
 src/v_dbg2.c                               |   8 +-
 src/v_ex.c                                 |   6 +-
 src/v_ex2.c                                |   8 +-
 src/v_ex4.c                                |   2 +-
 src/v_fx.c                                 |   4 +-
 src/v_ms.c                                 |   8 +-
 src/v_sdf.c                                |   2 +-
 src/v_src3.c                               |  10 +-
 21 files changed, 612 insertions(+), 291 deletions(-)

diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 42ff28c..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-AUTOMAKE_OPTIONS = foreign
-
-SUBDIRS = src
-
-EXTRA_DIST = $(top_srcdir)/LICENSE $(top_srcdir)/NEW.CVER.2001.RELEASE.NOTES \
-   $(top_srcdir)/OUR_PHILOSOPHY \
-  $(top_srcdir)/dinotrace.dir $(top_srcdir)/pli_incs \
-  $(top_srcdir)/pli_src \
-  $(top_srcdir)/tests_and_examples \
-  $(top_srcdir)/vcddiff.dir \
-  $(top_srcdir)/ver_src
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 0d67712..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,60 +0,0 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.61)
-AC_INIT(cver, 2.11a, gniibe at fsij.org)
-AM_INIT_AUTOMAKE
-AC_CONFIG_SRCDIR([src/cver.c])
-AC_CONFIG_HEADER([src/config.h])
-
-# Checks for programs.
-AC_PROG_CC
-
-# Checks for libraries.
-
-# Checks for header files.
-AC_HEADER_DIRENT
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-# fcntl.h limits.h stdlib.h string.h unistd.h sys/time.h sys/timeb.h 
-# AC_CHECK_HEADERS([ ])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_HEADER_STDBOOL
-AC_C_CONST
-AC_TYPE_OFF_T
-AC_HEADER_TIME
-
-# Checks for library functions.
-AC_FUNC_CLOSEDIR_VOID
-AC_FUNC_FORK
-AC_FUNC_MALLOC
-AC_FUNC_MEMCMP
-AC_FUNC_REALLOC
-AC_TYPE_SIGNAL
-AC_FUNC_STAT
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([getcwd gettimeofday memmove memset strchr strerror strrchr])
-
-# Checks for endianess
-AC_C_BIGENDIAN
-
-AC_OUTPUT(Makefile src/Makefile)
-
-# ??? drem --> remainder
-#
-# tolower, time, ...
-# 
-# Check info page of AC_HEADER_DIRENT
-#
-# __ELF__ cver.c
-# __CYGWIN32__ cver.c v.h v_fx.c v_src3.c
-# 
-# INTSIGS cver.c v_dbg.c v_ex.c v_sim.c
-# __FreeBSD__ cver.c v.h
-# __STATIC_PLI__ cver.c v_tf.c v_vpi.c
-# __SVR4 cver.c v_cnv.c v_dbg.c v_dbg2.c v_del.c v_ex2.c v_fx.c v_ms.c v_sdf.c v_src3.c
-# __hpux cver.c v_cnv.c v_del.c v_fx.c v_src3.c
-# __sparc cver.c v.h v_dbg.c v_dbg2.c v_ex2.c v_ms.c v_sdf.c v_src3.c
-# __i386__ cver.c v_dbg.c
-# __linux__ cver.c
diff --git a/debian/patches/autoconf.diff b/debian/patches/autoconf.diff
new file mode 100644
index 0000000..15d8431
--- /dev/null
+++ b/debian/patches/autoconf.diff
@@ -0,0 +1,425 @@
+Description: Added autoconf files
+Author: NIIBE Yutaka <gniibe at fsij.org>
+Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy at users.sourceforge.net>
+Last-Update: 2015-03-26
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,11 @@
++AUTOMAKE_OPTIONS = foreign
++
++SUBDIRS = src
++
++EXTRA_DIST = $(top_srcdir)/LICENSE $(top_srcdir)/NEW.CVER.2001.RELEASE.NOTES \
++   $(top_srcdir)/OUR_PHILOSOPHY \
++  $(top_srcdir)/dinotrace.dir $(top_srcdir)/pli_incs \
++  $(top_srcdir)/pli_src \
++  $(top_srcdir)/tests_and_examples \
++  $(top_srcdir)/vcddiff.dir \
++  $(top_srcdir)/ver_src
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,60 @@
++#                                               -*- Autoconf -*-
++# Process this file with autoconf to produce a configure script.
++
++AC_PREREQ(2.61)
++AC_INIT(cver, 2.11a, gniibe at fsij.org)
++AM_INIT_AUTOMAKE
++AC_CONFIG_SRCDIR([src/cver.c])
++AC_CONFIG_HEADER([src/config.h])
++
++# Checks for programs.
++AC_PROG_CC
++
++# Checks for libraries.
++
++# Checks for header files.
++AC_HEADER_DIRENT
++AC_HEADER_STDC
++AC_HEADER_SYS_WAIT
++# fcntl.h limits.h stdlib.h string.h unistd.h sys/time.h sys/timeb.h 
++# AC_CHECK_HEADERS([ ])
++
++# Checks for typedefs, structures, and compiler characteristics.
++AC_HEADER_STDBOOL
++AC_C_CONST
++AC_TYPE_OFF_T
++AC_HEADER_TIME
++
++# Checks for library functions.
++AC_FUNC_CLOSEDIR_VOID
++AC_FUNC_FORK
++AC_FUNC_MALLOC
++AC_FUNC_MEMCMP
++AC_FUNC_REALLOC
++AC_TYPE_SIGNAL
++AC_FUNC_STAT
++AC_FUNC_VPRINTF
++AC_CHECK_FUNCS([getcwd gettimeofday memmove memset strchr strerror strrchr])
++
++# Checks for endianess
++AC_C_BIGENDIAN
++
++AC_OUTPUT(Makefile src/Makefile)
++
++# ??? drem --> remainder
++#
++# tolower, time, ...
++# 
++# Check info page of AC_HEADER_DIRENT
++#
++# __ELF__ cver.c
++# __CYGWIN32__ cver.c v.h v_fx.c v_src3.c
++# 
++# INTSIGS cver.c v_dbg.c v_ex.c v_sim.c
++# __FreeBSD__ cver.c v.h
++# __STATIC_PLI__ cver.c v_tf.c v_vpi.c
++# __SVR4 cver.c v_cnv.c v_dbg.c v_dbg2.c v_del.c v_ex2.c v_fx.c v_ms.c v_sdf.c v_src3.c
++# __hpux cver.c v_cnv.c v_del.c v_fx.c v_src3.c
++# __sparc cver.c v.h v_dbg.c v_dbg2.c v_ex2.c v_ms.c v_sdf.c v_src3.c
++# __i386__ cver.c v_dbg.c
++# __linux__ cver.c
+--- /dev/null
++++ b/src/Makefile.am
+@@ -0,0 +1,13 @@
++bin_PROGRAMS = cver
++cver_SOURCES = dig_main.c \
++	       v.h systsks.h cvmacros.h \
++	       cver.c v_src.c v_src2.c v_src3.c \
++	       v_fx.c v_fx2.c v_fx3.c v_cnv.c \
++	       v_ex.c v_ex2.c v_ex3.c v_ex4.c \
++	       v_trch.c v_del.c v_sdf.c v_prp.c \
++	       v_prp2.c v_sim.c v_dbg.c v_dbg2.c \
++	       v_ms.c v_tf.c v_acc.c v_vpi.c \
++	       v_vpi2.c v_vpi3.c
++cver_CFLAGS = -I../pli_incs
++cver_LDADD = -lm -ldl
++cver_LDFLAGS = -export-dynamic
+--- /dev/null
++++ b/src/config.h.in
+@@ -0,0 +1,165 @@
++/* src/config.h.in.  Generated from configure.ac by autoheader.  */
++
++/* Define to 1 if the `closedir' function returns void instead of `int'. */
++#undef CLOSEDIR_VOID
++
++/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
++   */
++#undef HAVE_DIRENT_H
++
++/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
++#undef HAVE_DOPRNT
++
++/* Define to 1 if you have the `fork' function. */
++#undef HAVE_FORK
++
++/* Define to 1 if you have the `getcwd' function. */
++#undef HAVE_GETCWD
++
++/* Define to 1 if you have the `gettimeofday' function. */
++#undef HAVE_GETTIMEOFDAY
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#undef HAVE_INTTYPES_H
++
++/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
++   to 0 otherwise. */
++#undef HAVE_MALLOC
++
++/* Define to 1 if you have the `memmove' function. */
++#undef HAVE_MEMMOVE
++
++/* Define to 1 if you have the <memory.h> header file. */
++#undef HAVE_MEMORY_H
++
++/* Define to 1 if you have the `memset' function. */
++#undef HAVE_MEMSET
++
++/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
++#undef HAVE_NDIR_H
++
++/* Define to 1 if your system has a GNU libc compatible `realloc' function,
++   and to 0 otherwise. */
++#undef HAVE_REALLOC
++
++/* Define to 1 if `stat' has the bug that it succeeds when given the
++   zero-length file name argument. */
++#undef HAVE_STAT_EMPTY_STRING_BUG
++
++/* Define to 1 if stdbool.h conforms to C99. */
++#undef HAVE_STDBOOL_H
++
++/* Define to 1 if you have the <stdint.h> header file. */
++#undef HAVE_STDINT_H
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++#undef HAVE_STDLIB_H
++
++/* Define to 1 if you have the `strchr' function. */
++#undef HAVE_STRCHR
++
++/* Define to 1 if you have the `strerror' function. */
++#undef HAVE_STRERROR
++
++/* Define to 1 if you have the <strings.h> header file. */
++#undef HAVE_STRINGS_H
++
++/* Define to 1 if you have the <string.h> header file. */
++#undef HAVE_STRING_H
++
++/* Define to 1 if you have the `strrchr' function. */
++#undef HAVE_STRRCHR
++
++/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
++   */
++#undef HAVE_SYS_DIR_H
++
++/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
++   */
++#undef HAVE_SYS_NDIR_H
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#undef HAVE_SYS_STAT_H
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#undef HAVE_SYS_TYPES_H
++
++/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
++#undef HAVE_SYS_WAIT_H
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#undef HAVE_UNISTD_H
++
++/* Define to 1 if you have the `vfork' function. */
++#undef HAVE_VFORK
++
++/* Define to 1 if you have the <vfork.h> header file. */
++#undef HAVE_VFORK_H
++
++/* Define to 1 if you have the `vprintf' function. */
++#undef HAVE_VPRINTF
++
++/* Define to 1 if `fork' works. */
++#undef HAVE_WORKING_FORK
++
++/* Define to 1 if `vfork' works. */
++#undef HAVE_WORKING_VFORK
++
++/* Define to 1 if the system has the type `_Bool'. */
++#undef HAVE__BOOL
++
++/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
++   slash. */
++#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
++
++/* Name of package */
++#undef PACKAGE
++
++/* Define to the address where bug reports for this package should be sent. */
++#undef PACKAGE_BUGREPORT
++
++/* Define to the full name of this package. */
++#undef PACKAGE_NAME
++
++/* Define to the full name and version of this package. */
++#undef PACKAGE_STRING
++
++/* Define to the one symbol short name of this package. */
++#undef PACKAGE_TARNAME
++
++/* Define to the version of this package. */
++#undef PACKAGE_VERSION
++
++/* Define as the return type of signal handlers (`int' or `void'). */
++#undef RETSIGTYPE
++
++/* Define to 1 if you have the ANSI C header files. */
++#undef STDC_HEADERS
++
++/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
++#undef TIME_WITH_SYS_TIME
++
++/* Version number of package */
++#undef VERSION
++
++/* Define to 1 if your processor stores words with the most significant byte
++   first (like Motorola and SPARC, unlike Intel and VAX). */
++#undef WORDS_BIGENDIAN
++
++/* Define to empty if `const' does not conform to ANSI C. */
++#undef const
++
++/* Define to rpl_malloc if the replacement function should be used. */
++#undef malloc
++
++/* Define to `long int' if <sys/types.h> does not define. */
++#undef off_t
++
++/* Define to `int' if <sys/types.h> does not define. */
++#undef pid_t
++
++/* Define to rpl_realloc if the replacement function should be used. */
++#undef realloc
++
++/* Define as `fork' if `vfork' does not work. */
++#undef vfork
+--- a/src/v.h
++++ b/src/v.h
+@@ -1,5 +1,9 @@
+ /* Copyright (c) 1991-2007 Pragmatic C Software Corp. */
+ 
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
+ /*
+    This program is free software; you can redistribute it and/or modify it
+    under the terms of the GNU General Public License as published by the
+@@ -95,6 +99,7 @@
+ /* needed to allow signals to use normal decls */
+ typedef int32 sighandler();
+ 
++#ifndef HAVE_CONFIG_H
+ #ifndef __sparc
+ /* BEWARE - assuming all non sparc systems define BYTE_ORDER and endian.h */
+ /* to PORT change for your system */ 
+@@ -111,27 +116,25 @@
+ #   endif
+ #  endif
+ # endif
+-
+-typedef union {
+- word64 w64v; 
+-#if (BYTE_ORDER == BIG_ENDIAN)
+- struct { word32 high; word32 low; } w_u;
+-#else
+- struct { word32 low; word32 high; } w_u;
+-#endif
+-} w64_u;
++# if (BYTE_ORDER == BIG_ENDIAN)
++# define WORDS_BIGENDIAN 1
++# endif
+ #else
+ #include <sys/isa_defs.h>
++# if defined(_BIG_ENDIAN)
++# define WORDS_BIGENDIAN 1
++# endif
++#endif
++#endif
+ 
+ typedef union {
+  word64 w64v; 
+-#if defined(_BIG_ENDIAN)
++#if defined(WORDS_BIGENDIAN)
+  struct { word32 high; word32 low; } w_u;
+ #else
+  struct { word32 low; word32 high; } w_u;
+ #endif
+ } w64_u;
+-#endif
+ 
+ #define TRUE 1
+ #define FALSE 0
+--- a/src/v_cnv.c
++++ b/src/v_cnv.c
+@@ -1624,7 +1624,7 @@
+ /* ---
+ INVERSE:
+ 
+-#if (BYTE_ORDER == BIG_ENDIAN)
++#if defined(WORDS_BIGENDIAN)
+    wrd = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
+     | ((b4 & 0xff) << 24);
+ #else
+@@ -1648,7 +1648,7 @@
+   {
+    wrd = ap[wi] & (bp[wi] ^ 0xffffffff);
+ 
+-#if (BYTE_ORDER != BIG_ENDIAN)
++#if defined(WORDS_BIGENDIAN)
+    for (j = 24; j >= 0; j -= 8)
+     {
+      bval = (wrd >> j) & 0xff;
+@@ -1678,7 +1678,7 @@
+ 
+  for (wi = 0; wi < wlen_(blen); wi++)
+   {
+-#if (BYTE_ORDER != BIG_ENDIAN)
++#if defined(WORDS_BIGENDIAN)
+    for (j = 24; j >= 0; j -= 8)
+     {
+      bval = (ap[wi] >> j) & 0xff;
+--- a/src/v_dbg.c
++++ b/src/v_dbg.c
+@@ -34,11 +34,6 @@
+ #include <string.h>
+ #include <ctype.h>
+ 
+-#ifdef __linux__
+-#include <sys/types.h>
+-#include <sys/wait.h>
+-#endif
+-
+ #include <signal.h>
+ 
+ #include <unistd.h>
+--- a/src/v_ex.c
++++ b/src/v_ex.c
+@@ -8492,7 +8492,7 @@
+    b3 = (word32) c;
+    if ((c = scanf_getc(f)) == EOF) return(NULL);
+    b4 = (word32) c;
+-#if (BYTE_ORDER == BIG_ENDIAN)
++#if defined(WORDS_BIGENDIAN)
+    wrd = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
+     | ((b4 & 0xff) << 24);
+ #else
+@@ -8526,7 +8526,7 @@
+    b3 = (word32) c;
+    if ((c = scanf_getc(f)) == EOF) return(NULL);
+    b4 = (word32) c;
+-#if (BYTE_ORDER == BIG_ENDIAN)
++#if defined(WORDS_BIGENDIAN)
+    wrd = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
+     | ((b4 & 0xff) << 24);
+ #else
+@@ -8543,7 +8543,7 @@
+    b3 = (word32) c;
+    if ((c = scanf_getc(f)) == EOF) return(NULL);
+    b4 = (word32) c;
+-#if (BYTE_ORDER == BIG_ENDIAN)
++#if defined(WORDS_BIGENDIAN)
+    wrd2 = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
+     | ((b4 & 0xff) << 24);
+ #else
+--- a/src/v_fx.c
++++ b/src/v_fx.c
+@@ -37,7 +37,7 @@
+ 
+ #include <sys/types.h>
+ 
+-#if defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
++#if defined(HAVE_DIRENT_H) || defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
+ #include <dirent.h>
+ #else
+ #include <sys/dir.h>
+@@ -798,7 +798,7 @@
+  register int32 last_fi;
+  register int32 numdfils, siz_mydir, bytlen, obytlen;
+  DIR *dirp;
+-#if defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
++#if defined(HAVE_DIRENT_H) || defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
+  struct dirent *dp;
+ #else
+  /* all BSD cases and special case interface for non unices */
+--- a/src/v_src3.c
++++ b/src/v_src3.c
+@@ -40,7 +40,7 @@
+ #include <sys/stat.h>
+ #endif
+ 
+-#if defined(__CYGWIN32__) || defined(__SVR4) || defined(__hpux)
++#if defined(HAVE_DIRENT_H) || defined(__CYGWIN32__) || defined(__SVR4) || defined(__hpux)
+ #include <dirent.h>
+ #else
+ #include <sys/dir.h>
diff --git a/debian/patches/fix_sparc_ftbfs.diff b/debian/patches/fix_sparc_ftbfs.diff
new file mode 100644
index 0000000..7810ae0
--- /dev/null
+++ b/debian/patches/fix_sparc_ftbfs.diff
@@ -0,0 +1,124 @@
+Description: Fix FTBFS on Sparc
+Author: NIIBE Yutaka <gniibe at fsij.org>
+diff --git a/src/cver.c b/src/cver.c
+index fb8a0ca..be8d9a4 100644
+--- a/src/cver.c
++++ b/src/cver.c
+@@ -1058,7 +1058,7 @@ extern int32 __dig_main(int32 argc, char **argv)
+  __platform = __pv_stralloc("Mac OSX");
+ #endif
+ 
+-#ifdef __sparc
++#if defined(__sparc) && !defined(__GNU_LIBRARY__)
+  __platform = __pv_stralloc("Sparc-Solaris");
+ #endif
+ #if defined(__i386__) && defined(__SVR4)
+diff --git a/src/v_dbg2.c b/src/v_dbg2.c
+index ca3b67b..94ccfbc 100644
+--- a/src/v_dbg2.c
++++ b/src/v_dbg2.c
+@@ -46,15 +46,15 @@
+ #include "../malloc.h"
+ #endif
+ 
++#include "v.h"
++#include "cvmacros.h"
++
+ /* REMOVEME - no longer supporting SunOS - maybe needed for hpux? */
+-#if defined(__sparc) && !defined(__SVR4)  
++#if defined(__sparc) && !defined(__SVR4) && !defined(__GNU_LIBRARY__)
+ extern int32 tolower(int32);
+ extern int32 sscanf(char *, char *, ...); 
+ #endif
+ 
+-#include "v.h"
+-#include "cvmacros.h"
+-
+ /* local prototypes */
+ static void get_middle_linrng(int32, int32 *, int32 *);
+ static struct incloc_t *find_incloc(register int32);
+diff --git a/src/v_ex2.c b/src/v_ex2.c
+index e760385..40dd1e0 100644
+--- a/src/v_ex2.c
++++ b/src/v_ex2.c
+@@ -39,15 +39,15 @@
+ #include "../malloc.h"
+ #endif
+ 
++#include "v.h"
++#include "cvmacros.h"
++
+ /* REMOVEME - no longer supporting SunOS - maybe needed for hpux? */
+-#if defined(__sparc) && !defined(__SVR4)  
++#if defined(__sparc) && !defined(__SVR4) && !defined(__GNU_LIBRARY__)
+ extern int32 tolower(int32);
+ extern ungetc(int32 c, FILE *);
+ #endif
+ 
+-#include "v.h"
+-#include "cvmacros.h"
+-
+ /* local prototypes */
+ static void prep_bld_monit_dces(struct expr_t *, int32);
+ static void linkon_monit_dce(struct net_t *, int32, int32, int32,
+diff --git a/src/v_ms.c b/src/v_ms.c
+index 27dbca2..046f527 100644
+--- a/src/v_ms.c
++++ b/src/v_ms.c
+@@ -51,16 +51,16 @@
+ #include "../malloc.h"
+ #endif
+ 
++#include "v.h"
++#include "cvmacros.h"
++
+ /* REMOVEME - no longer supporting SunOS - maybe needed for hpux? */
+-#if defined(__sparc) && !defined(__SVR4)  
++#if defined(__sparc) && !defined(__SVR4) && !defined(__GNU_LIBRARY__)
+ extern int32 tolower(int32);
+ extern ungetc(int32 c, FILE *);
+ extern long time (long *);
+ #endif
+ 
+-#include "v.h"
+-#include "cvmacros.h"
+-
+ /* local prototypes */
+ static char *expand_arg_macro(struct sy_t *, int32 *);
+ static void process_macdef(void);
+diff --git a/src/v_sdf.c b/src/v_sdf.c
+index f619dc4..ef71945 100644
+--- a/src/v_sdf.c
++++ b/src/v_sdf.c
+@@ -44,7 +44,7 @@
+ #include "cvmacros.h"
+ 
+ /* REMOVEME - no longer supporting SunOS - maybe needed for hpux? */
+-#if defined(__sparc) && !defined(__SVR4)  
++#if defined(__sparc) && !defined(__SVR4) && !defined(__GNU_LIBRARY__)
+ extern ungetc(int32 c, FILE *);
+ #endif
+ 
+diff --git a/src/v_src3.c b/src/v_src3.c
+index 72fac42..b331d61 100644
+--- a/src/v_src3.c
++++ b/src/v_src3.c
+@@ -50,14 +50,14 @@
+ #include "../malloc.h"
+ #endif
+ 
++#include "v.h"
++#include "cvmacros.h"
++
+ /* REMOVEME - no longer supporting SunOS - maybe needed for hpux? */
+-#if defined(__sparc) && !defined(__SVR4)  
++#if defined(__sparc) && !defined(__SVR4) && !defined(__GNU_LIBRARY__)
+ extern int32 tolower(int32);
+ #endif
+ 
+-#include "v.h"
+-#include "cvmacros.h"
+-
+ /* local prototypes */
+ static struct udp_t *alloc_udp(struct sy_t *);
+ static int32 rd_udp_hdr(struct udp_t *);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..bb1485b
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+autoconf.diff
+fix_sparc_ftbfs.diff
+string_format_security.diff
diff --git a/debian/patches/string_format_security.diff b/debian/patches/string_format_security.diff
new file mode 100644
index 0000000..1ccfef5
--- /dev/null
+++ b/debian/patches/string_format_security.diff
@@ -0,0 +1,15 @@
+Description: Added format argument for an sprintf call that prints a variable string
+Author: أحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy at users.sourceforge.net>
+diff --git a/src/v_ex4.c b/src/v_ex4.c
+index 4375ee0..18cb857 100644
+--- a/src/v_ex4.c
++++ b/src/v_ex4.c
+@@ -4158,7 +4158,7 @@ extern char *__bld_showvars_prefix(char *s, struct net_t *np,
+  if (np->n_isavec && np->ntyp != N_INT && np->ntyp != N_TIME
+   && np->ntyp != N_REAL) sprintf(s2, " %s", __to_wrange(s3, np));
+  else strcpy(s2, "");
+- if (np->n_isarr) sprintf(s4, __to_arr_range(s3, np)); else strcpy(s4, "");
++ if (np->n_isarr) sprintf(s4, "%s", __to_arr_range(s3, np)); else strcpy(s4, "");
+ 
+  /* if xmr form must emit path given as arg */
+  if (grp == NULL) __schop(s3, np->nsym->synam); else __schop(s3, grp->gnam); 
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index c175bc9..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,13 +0,0 @@
-bin_PROGRAMS = cver
-cver_SOURCES = dig_main.c \
-	       v.h systsks.h cvmacros.h \
-	       cver.c v_src.c v_src2.c v_src3.c \
-	       v_fx.c v_fx2.c v_fx3.c v_cnv.c \
-	       v_ex.c v_ex2.c v_ex3.c v_ex4.c \
-	       v_trch.c v_del.c v_sdf.c v_prp.c \
-	       v_prp2.c v_sim.c v_dbg.c v_dbg2.c \
-	       v_ms.c v_tf.c v_acc.c v_vpi.c \
-	       v_vpi2.c v_vpi3.c
-cver_CFLAGS = -I../pli_incs
-cver_LDADD = -lm -ldl
-cver_LDFLAGS = -export-dynamic
diff --git a/src/config.h.in b/src/config.h.in
deleted file mode 100644
index a6eb623..0000000
--- a/src/config.h.in
+++ /dev/null
@@ -1,165 +0,0 @@
-/* src/config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to 1 if the `closedir' function returns void instead of `int'. */
-#undef CLOSEDIR_VOID
-
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_DIRENT_H
-
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
-
-/* Define to 1 if you have the `fork' function. */
-#undef HAVE_FORK
-
-/* Define to 1 if you have the `getcwd' function. */
-#undef HAVE_GETCWD
-
-/* Define to 1 if you have the `gettimeofday' function. */
-#undef HAVE_GETTIMEOFDAY
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
-   to 0 otherwise. */
-#undef HAVE_MALLOC
-
-/* Define to 1 if you have the `memmove' function. */
-#undef HAVE_MEMMOVE
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `memset' function. */
-#undef HAVE_MEMSET
-
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-#undef HAVE_NDIR_H
-
-/* Define to 1 if your system has a GNU libc compatible `realloc' function,
-   and to 0 otherwise. */
-#undef HAVE_REALLOC
-
-/* Define to 1 if `stat' has the bug that it succeeds when given the
-   zero-length file name argument. */
-#undef HAVE_STAT_EMPTY_STRING_BUG
-
-/* Define to 1 if stdbool.h conforms to C99. */
-#undef HAVE_STDBOOL_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the `strrchr' function. */
-#undef HAVE_STRRCHR
-
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_SYS_DIR_H
-
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_SYS_NDIR_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-#undef HAVE_SYS_WAIT_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `vfork' function. */
-#undef HAVE_VFORK
-
-/* Define to 1 if you have the <vfork.h> header file. */
-#undef HAVE_VFORK_H
-
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
-/* Define to 1 if `fork' works. */
-#undef HAVE_WORKING_FORK
-
-/* Define to 1 if `vfork' works. */
-#undef HAVE_WORKING_VFORK
-
-/* Define to 1 if the system has the type `_Bool'. */
-#undef HAVE__BOOL
-
-/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
-   slash. */
-#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
-/* Version number of package */
-#undef VERSION
-
-/* Define to 1 if your processor stores words with the most significant byte
-   first (like Motorola and SPARC, unlike Intel and VAX). */
-#undef WORDS_BIGENDIAN
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to rpl_malloc if the replacement function should be used. */
-#undef malloc
-
-/* Define to `long int' if <sys/types.h> does not define. */
-#undef off_t
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef pid_t
-
-/* Define to rpl_realloc if the replacement function should be used. */
-#undef realloc
-
-/* Define as `fork' if `vfork' does not work. */
-#undef vfork
diff --git a/src/cver.c b/src/cver.c
index be8d9a4..fb8a0ca 100644
--- a/src/cver.c
+++ b/src/cver.c
@@ -1058,7 +1058,7 @@ extern int32 __dig_main(int32 argc, char **argv)
  __platform = __pv_stralloc("Mac OSX");
 #endif
 
-#if defined(__sparc) && !defined(__GNU_LIBRARY__)
+#ifdef __sparc
  __platform = __pv_stralloc("Sparc-Solaris");
 #endif
 #if defined(__i386__) && defined(__SVR4)
diff --git a/src/v.h b/src/v.h
index 33ec986..063aaf3 100644
--- a/src/v.h
+++ b/src/v.h
@@ -1,9 +1,5 @@
 /* Copyright (c) 1991-2007 Pragmatic C Software Corp. */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
 /*
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
@@ -99,7 +95,6 @@ typedef int32 i_tev_ndx;
 /* needed to allow signals to use normal decls */
 typedef int32 sighandler();
 
-#ifndef HAVE_CONFIG_H
 #ifndef __sparc
 /* BEWARE - assuming all non sparc systems define BYTE_ORDER and endian.h */
 /* to PORT change for your system */ 
@@ -116,25 +111,27 @@ typedef int32 sighandler();
 #   endif
 #  endif
 # endif
-# if (BYTE_ORDER == BIG_ENDIAN)
-# define WORDS_BIGENDIAN 1
-# endif
+
+typedef union {
+ word64 w64v; 
+#if (BYTE_ORDER == BIG_ENDIAN)
+ struct { word32 high; word32 low; } w_u;
 #else
-#include <sys/isa_defs.h>
-# if defined(_BIG_ENDIAN)
-# define WORDS_BIGENDIAN 1
-# endif
-#endif
+ struct { word32 low; word32 high; } w_u;
 #endif
+} w64_u;
+#else
+#include <sys/isa_defs.h>
 
 typedef union {
  word64 w64v; 
-#if defined(WORDS_BIGENDIAN)
+#if defined(_BIG_ENDIAN)
  struct { word32 high; word32 low; } w_u;
 #else
  struct { word32 low; word32 high; } w_u;
 #endif
 } w64_u;
+#endif
 
 #define TRUE 1
 #define FALSE 0
diff --git a/src/v_cnv.c b/src/v_cnv.c
index 2f69544..4beb1d5 100644
--- a/src/v_cnv.c
+++ b/src/v_cnv.c
@@ -1624,7 +1624,7 @@ static void vstr_to_cstr(char *vstr, int32 blen, int32 space_0, int32 nd_quotes,
 /* ---
 INVERSE:
 
-#if defined(WORDS_BIGENDIAN)
+#if (BYTE_ORDER == BIG_ENDIAN)
    wrd = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
     | ((b4 & 0xff) << 24);
 #else
@@ -1648,7 +1648,7 @@ static void disp_ufmt_binval(word32 *ap, word32 *bp, int32 blen)
   {
    wrd = ap[wi] & (bp[wi] ^ 0xffffffff);
 
-#if defined(WORDS_BIGENDIAN)
+#if (BYTE_ORDER != BIG_ENDIAN)
    for (j = 24; j >= 0; j -= 8)
     {
      bval = (wrd >> j) & 0xff;
@@ -1678,7 +1678,7 @@ static void disp_zfmt_binval(word32 *ap, word32 *bp, int32 blen)
 
  for (wi = 0; wi < wlen_(blen); wi++)
   {
-#if defined(WORDS_BIGENDIAN)
+#if (BYTE_ORDER != BIG_ENDIAN)
    for (j = 24; j >= 0; j -= 8)
     {
      bval = (ap[wi] >> j) & 0xff;
diff --git a/src/v_dbg.c b/src/v_dbg.c
index c4e7f3d..1f6fee3 100644
--- a/src/v_dbg.c
+++ b/src/v_dbg.c
@@ -34,6 +34,11 @@
 #include <string.h>
 #include <ctype.h>
 
+#ifdef __linux__
+#include <sys/types.h>
+#include <sys/wait.h>
+#endif
+
 #include <signal.h>
 
 #include <unistd.h>
diff --git a/src/v_dbg2.c b/src/v_dbg2.c
index 94ccfbc..ca3b67b 100644
--- a/src/v_dbg2.c
+++ b/src/v_dbg2.c
@@ -46,15 +46,15 @@
 #include "../malloc.h"
 #endif
 
-#include "v.h"
-#include "cvmacros.h"
-
 /* REMOVEME - no longer supporting SunOS - maybe needed for hpux? */
-#if defined(__sparc) && !defined(__SVR4) && !defined(__GNU_LIBRARY__)
+#if defined(__sparc) && !defined(__SVR4)  
 extern int32 tolower(int32);
 extern int32 sscanf(char *, char *, ...); 
 #endif
 
+#include "v.h"
+#include "cvmacros.h"
+
 /* local prototypes */
 static void get_middle_linrng(int32, int32 *, int32 *);
 static struct incloc_t *find_incloc(register int32);
diff --git a/src/v_ex.c b/src/v_ex.c
index ed8c992..0db0a62 100644
--- a/src/v_ex.c
+++ b/src/v_ex.c
@@ -8492,7 +8492,7 @@ static struct xstk_t *collect_ufmt_binval(FILE *f, struct expr_t *lhsx, int32 c)
    b3 = (word32) c;
    if ((c = scanf_getc(f)) == EOF) return(NULL);
    b4 = (word32) c;
-#if defined(WORDS_BIGENDIAN)
+#if (BYTE_ORDER == BIG_ENDIAN)
    wrd = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
     | ((b4 & 0xff) << 24);
 #else
@@ -8526,7 +8526,7 @@ static struct xstk_t *collect_zfmt_binval(FILE *f, struct expr_t *lhsx,
    b3 = (word32) c;
    if ((c = scanf_getc(f)) == EOF) return(NULL);
    b4 = (word32) c;
-#if defined(WORDS_BIGENDIAN)
+#if (BYTE_ORDER == BIG_ENDIAN)
    wrd = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
     | ((b4 & 0xff) << 24);
 #else
@@ -8543,7 +8543,7 @@ static struct xstk_t *collect_zfmt_binval(FILE *f, struct expr_t *lhsx,
    b3 = (word32) c;
    if ((c = scanf_getc(f)) == EOF) return(NULL);
    b4 = (word32) c;
-#if defined(WORDS_BIGENDIAN)
+#if (BYTE_ORDER == BIG_ENDIAN)
    wrd2 = (b1 & 0xff) | ((b2 & 0xff) << 8) | ((b3 & 0xff) << 16)
     | ((b4 & 0xff) << 24);
 #else
diff --git a/src/v_ex2.c b/src/v_ex2.c
index 40dd1e0..e760385 100644
--- a/src/v_ex2.c
+++ b/src/v_ex2.c
@@ -39,15 +39,15 @@
 #include "../malloc.h"
 #endif
 
-#include "v.h"
-#include "cvmacros.h"
-
 /* REMOVEME - no longer supporting SunOS - maybe needed for hpux? */
-#if defined(__sparc) && !defined(__SVR4) && !defined(__GNU_LIBRARY__)
+#if defined(__sparc) && !defined(__SVR4)  
 extern int32 tolower(int32);
 extern ungetc(int32 c, FILE *);
 #endif
 
+#include "v.h"
+#include "cvmacros.h"
+
 /* local prototypes */
 static void prep_bld_monit_dces(struct expr_t *, int32);
 static void linkon_monit_dce(struct net_t *, int32, int32, int32,
diff --git a/src/v_ex4.c b/src/v_ex4.c
index 18cb857..4375ee0 100644
--- a/src/v_ex4.c
+++ b/src/v_ex4.c
@@ -4158,7 +4158,7 @@ extern char *__bld_showvars_prefix(char *s, struct net_t *np,
  if (np->n_isavec && np->ntyp != N_INT && np->ntyp != N_TIME
   && np->ntyp != N_REAL) sprintf(s2, " %s", __to_wrange(s3, np));
  else strcpy(s2, "");
- if (np->n_isarr) sprintf(s4, "%s", __to_arr_range(s3, np)); else strcpy(s4, "");
+ if (np->n_isarr) sprintf(s4, __to_arr_range(s3, np)); else strcpy(s4, "");
 
  /* if xmr form must emit path given as arg */
  if (grp == NULL) __schop(s3, np->nsym->synam); else __schop(s3, grp->gnam); 
diff --git a/src/v_fx.c b/src/v_fx.c
index 8c70f67..85cedcb 100644
--- a/src/v_fx.c
+++ b/src/v_fx.c
@@ -37,7 +37,7 @@
 
 #include <sys/types.h>
 
-#if defined(HAVE_DIRENT_H) || defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
+#if defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
 #include <dirent.h>
 #else
 #include <sys/dir.h>
@@ -798,7 +798,7 @@ static void bld_ylb_dirfiles(struct vylib_t *vyp)
  register int32 last_fi;
  register int32 numdfils, siz_mydir, bytlen, obytlen;
  DIR *dirp;
-#if defined(HAVE_DIRENT_H) || defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
+#if defined(__SVR4) || defined(__hpux) || defined(__CYGWIN32__)
  struct dirent *dp;
 #else
  /* all BSD cases and special case interface for non unices */
diff --git a/src/v_ms.c b/src/v_ms.c
index 046f527..27dbca2 100644
--- a/src/v_ms.c
+++ b/src/v_ms.c
@@ -51,16 +51,16 @@
 #include "../malloc.h"
 #endif
 
-#include "v.h"
-#include "cvmacros.h"
-
 /* REMOVEME - no longer supporting SunOS - maybe needed for hpux? */
-#if defined(__sparc) && !defined(__SVR4) && !defined(__GNU_LIBRARY__)
+#if defined(__sparc) && !defined(__SVR4)  
 extern int32 tolower(int32);
 extern ungetc(int32 c, FILE *);
 extern long time (long *);
 #endif
 
+#include "v.h"
+#include "cvmacros.h"
+
 /* local prototypes */
 static char *expand_arg_macro(struct sy_t *, int32 *);
 static void process_macdef(void);
diff --git a/src/v_sdf.c b/src/v_sdf.c
index ef71945..f619dc4 100644
--- a/src/v_sdf.c
+++ b/src/v_sdf.c
@@ -44,7 +44,7 @@
 #include "cvmacros.h"
 
 /* REMOVEME - no longer supporting SunOS - maybe needed for hpux? */
-#if defined(__sparc) && !defined(__SVR4) && !defined(__GNU_LIBRARY__)
+#if defined(__sparc) && !defined(__SVR4)  
 extern ungetc(int32 c, FILE *);
 #endif
 
diff --git a/src/v_src3.c b/src/v_src3.c
index 36ae879..72fac42 100644
--- a/src/v_src3.c
+++ b/src/v_src3.c
@@ -40,7 +40,7 @@
 #include <sys/stat.h>
 #endif
 
-#if defined(HAVE_DIRENT_H) || defined(__CYGWIN32__) || defined(__SVR4) || defined(__hpux)
+#if defined(__CYGWIN32__) || defined(__SVR4) || defined(__hpux)
 #include <dirent.h>
 #else
 #include <sys/dir.h>
@@ -50,14 +50,14 @@
 #include "../malloc.h"
 #endif
 
-#include "v.h"
-#include "cvmacros.h"
-
 /* REMOVEME - no longer supporting SunOS - maybe needed for hpux? */
-#if defined(__sparc) && !defined(__SVR4) && !defined(__GNU_LIBRARY__)
+#if defined(__sparc) && !defined(__SVR4)  
 extern int32 tolower(int32);
 #endif
 
+#include "v.h"
+#include "cvmacros.h"
+
 /* local prototypes */
 static struct udp_t *alloc_udp(struct sy_t *);
 static int32 rd_udp_hdr(struct udp_t *);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-electronics/gplcver.git



More information about the Pkg-electronics-commits mailing list