Commit 59efa416 authored by Gudjon I. Gudjonsson's avatar Gudjon I. Gudjonsson Committed by Geert Stappers

Import Debian changes 2.9.0-4

sdcc (2.9.0-4) unstable; urgency=low

  * Add patch 01_fix_ftbs (Closes: #552867)
  * Bump standards version to 3.8.3, no changes needed
  * Remove bashism from debian scripts (Closes: #535420)
  * Add README.source file
  * Add patch 02_result_type_gptr
  * Add dependency on quilt
parent 4eaecf71
......@@ -7326,6 +7326,44 @@ $as_echo "no" >&6; }
fi
# Extract the first word of "latex2html", so it can be a program name with args.
set dummy latex2html; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_LATEX2HTML+set}" = set; then
$as_echo_n "(cached) " >&6
else
if test -n "$LATEX2HTML"; then
ac_cv_prog_LATEX2HTML="$LATEX2HTML" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_LATEX2HTML="latex2html"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
test -z "$ac_cv_prog_LATEX2HTML" && ac_cv_prog_LATEX2HTML=":"
fi
fi
LATEX2HTML=$ac_cv_prog_LATEX2HTML
if test -n "$LATEX2HTML"; then
{ $as_echo "$as_me:$LINENO: result: $LATEX2HTML" >&5
$as_echo "$LATEX2HTML" >&6; }
else
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
# Extract the first word of "pdflatex", so it can be a program name with args.
set dummy pdflatex; ac_word=$2
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
......
......@@ -685,12 +685,14 @@ AC_DO_DISABLER(sdcdb, SDCDB, [Disables building sdcdb])
AC_DO_ENABLER(doc, DOC, [Enables building the documentation])
AC_CHECK_PROG([LYX], [lyx], [lyx], [:])
AC_CHECK_PROG([LATEX2HTML], [latex2html], [latex2html], [:])
AC_CHECK_PROG([PDFLATEX], [pdflatex], [pdflatex], [:])
AC_CHECK_PROG([PDFOPT], [pdfopt], [pdfopt], [:])
AC_CHECK_PROG([MAKEINDEX], [makeindex], [makeindex], [:])
if test $OPT_ENABLE_DOC = 1; then
SDCC_REQUIRE_PROG($LYX, lyx)
SDCC_REQUIRE_PROG($LATEX2HTML, latex2html)
SDCC_REQUIRE_PROG($PDFLATEX, pdflatex)
SDCC_REQUIRE_PROG($PDFOPT, pdfopt)
SDCC_REQUIRE_PROG($MAKEINDEX, makeindex)
......
sdcc (2.9.0-4) unstable; urgency=low
* Add patch 01_fix_ftbs (Closes: #552867)
* Bump standards version to 3.8.3, no changes needed
* Remove bashism from debian scripts (Closes: #535420)
* Add README.source file
* Add patch 02_result_type_gptr
* Add dependency on quilt
-- Gudjon I. Gudjonsson <gudjon@gudjon.org> Sat, 14 Nov 2009 18:22:59 +0100
sdcc (2.9.0-3) unstable; urgency=low
* patch from Keith Packard to promote varargs pointers to RESULT_TYPE_GPTR,
......
......@@ -4,8 +4,8 @@ Priority: optional
Maintainer: Gudjon I. Gudjonsson <gudjon@gudjon.org>
Uploaders: Bdale Garbee <bdale@gag.com>
Build-Depends: debhelper (>=7), autoconf, autotools-dev, libtool, flex, bison,
libncurses5-dev, gputils, lyx, texlive, ghostscript
Standards-Version: 3.8.1
libncurses5-dev, gputils, lyx, texlive, ghostscript, quilt
Standards-Version: 3.8.3
Homepage: http://sdcc.sourceforge.net
Package: sdcc
......
/*
lk_readnl.c - read a line from file into a buffer
version 1.0.0, April 25th, 2008
Copyright (c) 2008 Borut Razem
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Borut Razem
borut.razem@siol.net
*/
#include "lk_readnl.h"
/*******************************************************************************
lk_readnl
lk_readnl() reads in at most one less than size characters from stream and stores
them into the buffer pointed to by s. Reading stops after an EOF or a newline.
The newline character is not stored into the buffer. A '\0' is stored after the
last character in the buffer. All the characters between size and the newline or
EOF are skipped.
lk_readnl() return s on success, and NULL on error or when end of file occurs
while no characters have been read.
*******************************************************************************/
char *
lk_readnl (char *s, int size, FILE * stream)
{
static char eof_f = 0;
int c = '\0';
char *s_o;
char prev_c;
if (eof_f)
{
eof_f = 0;
return NULL;
}
s_o = s;
--size; /* for null terminator */
while (size > 0)
{
prev_c = c;
if ((c = getc (stream)) == '\n' || c == EOF)
break;
if (prev_c == '\r')
{
*s++ = prev_c;
if (--size <= 0)
break;
}
if (c != '\r')
{
*s++ = c;
--size;
}
}
*s = '\0';
while (c != '\n' && c != EOF)
c = getc (stream);
if (c == EOF)
{
if (s == s_o)
return NULL;
eof_f = 1;
}
return s_o;
}
/*
lk_readnl.h - read a line from file into a buffer
version 1.0.0, Aprile 25th, 2008
Copyright (c) 2008 Borut Razem
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Borut Razem
borut.razem@siol.net
*/
#ifndef __LK_READNL_H
#define __LK_READNL_H
#include <stdio.h>
#ifdef __cplusplus
extern "C"
{
#endif
char *lk_readnl (char *s, int size, FILE * stream);
#ifdef __cplusplus
}
#endif
#endif /* __LK_READNL_H */
--- a/as/link/hc08/Makefile.in
+++ b/as/link/hc08/Makefile.in
@@ -46,7 +46,7 @@
ASXXLIBSRC = strcmpi.c
-LKLIBSRC = getline.c lkaomf51.c lkar.c lkdata.c lkeval.c \
+LKLIBSRC = lk_readnl.c lkaomf51.c lkar.c lkdata.c lkeval.c \
lkhead.c lklex.c lklib.c lklibr.c lklist.c \
lknoice.c lkrel.c lksdcclib.c lkstore.c lksym.c
--- a/as/link/lklib.c
+++ b/as/link/lklib.c
@@ -31,7 +31,7 @@
#include <string.h>
-#include "getline.h"
+#include "lk_readnl.h"
#include "aslink.h"
#include "lklibr.h"
#include "lkrel.h"
@@ -51,7 +51,7 @@
{
char relfil[NINPUT];
- while (getline (relfil, sizeof (relfil), libfp) != NULL)
+ while (lk_readnl (relfil, sizeof (relfil), libfp) != NULL)
{
FILE *fp;
char str[PATH_MAX];
@@ -126,7 +126,7 @@
D ("Searching symbol: %s\n", name);
- while (getline (relfil, sizeof (relfil), libfp) != NULL)
+ while (lk_readnl (relfil, sizeof (relfil), libfp) != NULL)
{
char str[PATH_MAX];
FILE *fp;
@@ -206,7 +206,7 @@
*
* functions called:
* int fclose() c_library
- * char *getline() getline.c
+ * char *lk_readnl() lk_readnl.c
* FILE * fopen() c_library
* VOID link_main() lkmain.c
* int strlen() c_library
--- a/as/link/lksdcclib.c
+++ b/as/link/lksdcclib.c
@@ -32,13 +32,13 @@
#include <stdlib.h>
#include <string.h>
-#include "getline.h"
+#include "lk_readnl.h"
#include "aslink.h"
#include "lklibr.h"
#include "lkrel.h"
#define EQ(A,B) !strcmp((A),(B))
-#define MAXLINE 254 /*when using getline */
+#define MAXLINE 254 /*when using lk_readnl */
static int
@@ -72,14 +72,14 @@
char str[NINPUT];
int state = 0;
- while (getline (str, sizeof (str), libfp) != NULL)
+ while (lk_readnl (str, sizeof (str), libfp) != NULL)
{
switch (state)
{
case 0:
if (EQ (str, "<FILE>"))
{
- if (NULL != getline (str, sizeof (str), libfp) && EQ (str, ModName))
+ if (NULL != lk_readnl (str, sizeof (str), libfp) && EQ (str, ModName))
state = 1;
else
return 0;
@@ -105,7 +105,7 @@
long IndexOffset = 0;
pmlibrarysymbol ThisSym = NULL;
- while (getline (FLine, sizeof (FLine), libfp))
+ while (lk_readnl (FLine, sizeof (FLine), libfp))
{
switch (state)
{
@@ -113,7 +113,7 @@
if (EQ (FLine, "<INDEX>"))
{
/*The next line has the size of the index */
- getline (FLine, sizeof (FLine), libfp);
+ lk_readnl (FLine, sizeof (FLine), libfp);
IndexOffset = atol (FLine);
state = 1;
}
@@ -128,7 +128,7 @@
/* The next line has the name of the module and the offset
of the corresponding embedded file in the library */
- getline (FLine, sizeof (FLine), libfp);
+ lk_readnl (FLine, sizeof (FLine), libfp);
sscanf (FLine, "%s %ld", ModName, &FileOffset);
state = 2;
@@ -205,7 +205,7 @@
int state = 0;
int ret = 0;
- while (getline (str, sizeof (str), libfp) != NULL)
+ while (lk_readnl (str, sizeof (str), libfp) != NULL)
{
switch (state)
{
@@ -239,7 +239,7 @@
int state = 0;
long IndexOffset = 0, FileOffset;
- while (getline (FLine, sizeof (FLine), libfp))
+ while (lk_readnl (FLine, sizeof (FLine), libfp))
{
char filspc[PATH_MAX];
@@ -260,7 +260,7 @@
if (EQ (FLine, "<INDEX>"))
{
/* The next line has the size of the index */
- getline (FLine, sizeof (FLine), libfp);
+ lk_readnl (FLine, sizeof (FLine), libfp);
IndexOffset = atol (FLine);
state = 1;
}
@@ -271,7 +271,7 @@
{
/* The next line has the name of the module and the offset
of the corresponding embedded file in the library */
- getline (FLine, sizeof (FLine), libfp);
+ lk_readnl (FLine, sizeof (FLine), libfp);
sscanf (FLine, "%s %ld", ModName, &FileOffset);
state = 2;
}
--- a/sim/ucsim/cmd.src/newcmdposix.cc
+++ b/sim/ucsim/cmd.src/newcmdposix.cc
@@ -207,7 +207,7 @@
char *s= NULL;
#ifdef HAVE_GETLINE
- if (getline(&s, 0, in) < 0)
+ if (lk_readln(&s, 0, in) < 0)
return(0);
#elif defined HAVE_GETDELIM
size_t n= 30;
--- a/as/link/lkrel.c
+++ b/as/link/lkrel.c
@@ -32,7 +32,7 @@
#include <string.h>
#include <assert.h>
-#include "getline.h"
+#include "lk_readnl.h"
#include "aslink.h"
#include "lkrel.h"
@@ -79,7 +79,7 @@
end = (size >= 0) ? ftell (libfp) + size : -1;
- while ((end < 0 || ftell (libfp) < end) && getline (str, sizeof (str), libfp) != NULL)
+ while ((end < 0 || ftell (libfp) < end) && lk_readnl (str, sizeof (str), libfp) != NULL)
{
if (0 == strcmp (str, "</REL>"))
return 1;
@@ -110,7 +110,7 @@
* our object file and don't go into the next one.
*/
- while ((end < 0 || ftell (fp) < end) && getline (buf, sizeof (buf), fp) != NULL)
+ while ((end < 0 || ftell (fp) < end) && lk_readnl (buf, sizeof (buf), fp) != NULL)
{
char symname[NINPUT];
char c;
--- a/as/link/mcs51/Makefile.in
+++ b/as/link/mcs51/Makefile.in
@@ -46,7 +46,7 @@
ASXXLIBSRC = strcmpi.c
-LKLIBSRC = getline.c lkaomf51.c lkar.c lkdata.c lkeval.c \
+LKLIBSRC = lk_readnl.c lkaomf51.c lkar.c lkdata.c lkeval.c \
lkhead.c lklex.c lklib.c lklibr.c lklist.c \
lknoice.c lkrel.c lksdcclib.c lkstore.c lksym.c
--- a/as/link/z80/Makefile.in
+++ b/as/link/z80/Makefile.in
@@ -13,7 +13,7 @@
LKLIB = $(srcdir)/..
-LKLIBSRC = getline.c lkaomf51.c lkar.c lkdata.c lkeval.c \
+LKLIBSRC = lk_readnl.c lkaomf51.c lkar.c lkdata.c lkeval.c \
lkhead.c lklex.c lklib.c lklibr.c lklist.c \
lknoice.c lkrel.c lksdcclib.c lkstore.c lksym.c
--- a/src/SDCCast.c
+++ b/src/SDCCast.c
@@ -863,6 +863,8 @@
ftype = (*actParm)->ftype;
+ resultType = RESULT_TYPE_NONE;
+
/* If it's a char, upcast to int. */
if (IS_INTEGRAL (ftype)
&& (getSize (ftype) < (unsigned) INTSIZE))
@@ -874,12 +876,14 @@
{
newType = newAst_LINK (copyLinkChain(ftype));
DCL_TYPE (newType->opval.lnk) = port->unqualified_pointer;
+ resultType = RESULT_TYPE_GPTR;
}
if (IS_AGGREGATE (ftype))
{
newType = newAst_LINK (copyLinkChain (ftype));
DCL_TYPE (newType->opval.lnk) = port->unqualified_pointer;
+ resultType = RESULT_TYPE_GPTR;
}
if (newType)
@@ -890,7 +894,7 @@
(*actParm)->filename = (*actParm)->right->filename;
(*actParm)->lineno = (*actParm)->right->lineno;
- decorateType (*actParm, RESULT_TYPE_NONE);
+ decorateType (*actParm, resultType);
}
return 0;
} /* vararg */
01_fix_getline
02_result_type_gptr
#!/usr/bin/make -f
include /usr/share/quilt/quilt.make
export DH_VERBOSE=1
# These are used for cross-compiling and for saving the configure script
......@@ -17,19 +18,27 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM += -s
endif
clean:
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
# Clean up files that Makefile should have cleaned
rm -rf $(CURDIR)/build
rm -f support/cpp/config{args.h,.log,.status}
rm -f sim/ucsim/config.{guess,sub,status,log}
rm -f support/cpp/configargs.h,.log
rm -f support/cpp/config.log
rm -f support/cpp/config.status
rm -f sim/ucsim/config.guess
rm -f sim/ucsim/config.sub
rm -f sim/ucsim/config.status
rm -f sim/ucsim/config.log
rm -f config.log
rm -f device/lib/small-stack-auto/Makefile
rm -f as/link/asxxxx_config.h
rm -f device/lib/large/*.asm
rm -f device/lib/medium/*.asm
rm -f device/lib/small/*.asm
rm -f device/lib/small-stack-auto/*.asm
rm -f support/cpp/configargs.h
find -type f -name '*.o' -exec rm -f {} \;
find -type f -name '.stamp' -exec rm -f {} \;
find . -name '*.rel' -exec rm -f {} \;
......@@ -39,15 +48,19 @@ clean:
# Clean up the Debian specific files
rm -f config.status doc/sdccman.ps
rm -f build-stamp configure-stamp install-arch-stamp install-indep-stamp install-stamp
rm -f as/link/lk_readnl.c # Remove in next version
rm -f as/link/lk_readnl.h # Remove in next version
[ ! -f Makefile ] || $(MAKE) distclean
dh_clean
configure: configure-stamp
configure-stamp:
configure-stamp: $(QUILT_STAMPFN)
dh_testdir
mkdir -p $(CURDIR)/build
cp /usr/share/misc/config.sub sim/ucsim/config.sub
cp /usr/share/misc/config.guess sim/ucsim/config.guess
cp debian/lk_readnl.h as/link/lk_readnl.h # Remove in next version
cp debian/lk_readnl.c as/link/lk_readnl.c # Remove in next version
./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
......
......@@ -15,9 +15,9 @@ MANUAL = sdccman
TSS = test_suite_spec
CDB = cdbfileformat
all: $(MANUAL).pdf $(MANUAL).txt \
$(TSS).pdf $(TSS).txt \
$(CDB).pdf $(CDB).txt
all: $(MANUAL).pdf $(MANUAL).html/index.html $(MANUAL).txt \
$(TSS).pdf $(TSS).html/index.html $(TSS).txt \
$(CDB).pdf $(CDB).html/index.html $(CDB).txt
install:
$(INSTALL) -d $(DESTDIR)$(docdir)
......
......@@ -863,8 +863,6 @@ processParms (ast *func,
ftype = (*actParm)->ftype;
resultType = RESULT_TYPE_NONE;
/* If it's a char, upcast to int. */
if (IS_INTEGRAL (ftype)
&& (getSize (ftype) < (unsigned) INTSIZE))
......@@ -876,14 +874,12 @@ processParms (ast *func,
{
newType = newAst_LINK (copyLinkChain(ftype));
DCL_TYPE (newType->opval.lnk) = port->unqualified_pointer;
resultType = RESULT_TYPE_GPTR;
}
if (IS_AGGREGATE (ftype))
{
newType = newAst_LINK (copyLinkChain (ftype));
DCL_TYPE (newType->opval.lnk) = port->unqualified_pointer;
resultType = RESULT_TYPE_GPTR;
}
if (newType)
......@@ -894,7 +890,7 @@ processParms (ast *func,
(*actParm)->filename = (*actParm)->right->filename;
(*actParm)->lineno = (*actParm)->right->lineno;
decorateType (*actParm, resultType);
decorateType (*actParm, RESULT_TYPE_NONE);
}
return 0;
} /* vararg */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment