ncurses 5.9 - patch 20110430

+ modify rules in Ada95/src/Makefile.in to ensure that the PIC option
  is not used when building a static library (report by Nicolas
  Boulenguez):
+ Ada95 build-fix for big-endian architectures such as sparc.  This
  undoes one of the fixes from 20110319, which added an "Unused" member
  to representation clauses, replacing that with pragmas to suppress
  warnings about unused bits (patch by Nicolas Boulenguez):
This commit is contained in:
Thomas E. Dickey 2011-05-01 00:43:48 +00:00
parent 950eed9ace
commit e460260b42
4 changed files with 40 additions and 52 deletions

View File

@ -32,7 +32,7 @@
/*
Version Control
$Id: gen.c,v 1.59 2011/03/31 23:50:24 tom Exp $
$Id: gen.c,v 1.60 2011/04/30 19:47:19 Nicolas.Boulenguez Exp $
--------------------------------------------------------------------------*/
/*
This program generates various record structures and constants from the
@ -124,19 +124,15 @@ gen_reps(
int len, /* size of the record in bytes */
int bias)
{
const char *unused_name = "Unused";
int long_bits = (8 * (int)sizeof(unsigned long));
int len_bits = (8 * len);
int i, j, n, l, cnt = 0, low, high;
const int len_bits = (8 * len);
int i, l, low, high;
int width = strlen(RES_NAME) + 3;
unsigned long a;
unsigned long mask = 0;
assert(nap != NULL);
for (i = 0; nap[i].name != (char *)0; i++)
{
cnt++;
l = (int)strlen(nap[i].name);
if (l > width)
width = l;
@ -147,32 +143,8 @@ gen_reps(
printf(" record\n");
for (i = 0; nap[i].name != (char *)0; i++)
{
mask |= nap[i].attr;
printf(" %-*s : Boolean;\n", width, nap[i].name);
}
/*
* Compute a mask for the unused bits in this target.
*/
mask = ~mask;
/*
* Bits in the biased area are unused by the target.
*/
for (j = 0; j < bias; ++j)
{
mask &= (unsigned long)(~(1L << j));
}
/*
* Bits past the target's size are really unused.
*/
for (j = len_bits + bias; j < long_bits; ++j)
{
mask &= (unsigned long)(~(1L << j));
}
if (mask != 0)
{
printf(" %-*s : Boolean;\n", width, unused_name);
}
printf(" end record;\n");
printf(" pragma Convention (C, %s);\n\n", name);
@ -187,17 +159,10 @@ gen_reps(
printf(" %-*s at 0 range %2d .. %2d;\n", width, nap[i].name,
low - bias, high - bias);
}
if (mask != 0)
{
l = find_pos((char *)&mask, sizeof(mask), &low, &high);
if (l >= 0)
printf(" %-*s at 0 range %2d .. %2d;\n", width, unused_name,
low - bias, high - bias);
}
i = 1;
n = cnt;
printf(" end record;\n");
printf(" pragma Warnings (Off);");
printf(" for %s'Size use %d;\n", name, len_bits);
printf(" pragma Warnings (On);\n");
printf(" -- Please note: this rep. clause is generated and may be\n");
printf(" -- different on your system.");
}

View File

@ -28,7 +28,7 @@
#
# Author: Juergen Pfeifer, 1996
#
# $Id: Makefile.in,v 1.60 2011/03/31 09:46:16 tom Exp $
# $Id: Makefile.in,v 1.62 2011/04/30 22:24:45 tom Exp $
#
.SUFFIXES:
@ -218,7 +218,9 @@ $(ABASE)-trace.adb : $(srcdir)/$(ABASE)-trace.adb_p
$(ADAPREP) -DADA_TRACE=@ADA_TRACE@ -DPRAGMA_UNREF=@PRAGMA_UNREF@ $(srcdir)/$(ABASE)-trace.adb_p $@
###############################################################################
C_OBJS = c_varargs_to_ada.o ncurses_compat.o
# Use these definitions when building a shared library.
SHARED_C_OBJS = c_varargs_to_ada.o ncurses_compat.o
SHARED_OBJS = $(SHARED_C_OBJS) @USE_OLD_MAKERULES@$(LIBOBJS) @cf_generic_objects@
c_varargs_to_ada.o : $(srcdir)/c_varargs_to_ada.c
$(CC) $(CFLAGS_DEFAULT) -c -o $@ $(srcdir)/c_varargs_to_ada.c
@ -227,13 +229,22 @@ ncurses_compat.o : $(srcdir)/ncurses_compat.c
$(CC) $(CFLAGS_DEFAULT) -c -o $@ $(srcdir)/ncurses_compat.c
###############################################################################
# Use these definitions when building a static library.
STATIC_C_OBJS = static_c_varargs_to_ada.o static_ncurses_compat.o
STATIC_OBJS = $(STATIC_C_OBJS) @USE_OLD_MAKERULES@$(LIBOBJS) @cf_generic_objects@
MIXED_OBJS = $(C_OBJS) @USE_OLD_MAKERULES@$(LIBOBJS) @cf_generic_objects@
static_c_varargs_to_ada.o : $(srcdir)/c_varargs_to_ada.c
$(CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/c_varargs_to_ada.c
static_ncurses_compat.o : $(srcdir)/ncurses_compat.c
$(CC) $(CFLAGS_NORMAL) -c -o $@ $(srcdir)/ncurses_compat.c
###############################################################################
@USE_OLD_MAKERULES@$(BUILD_DIR_LIB)/$(STATIC_LIBNAME) :: \
@USE_OLD_MAKERULES@ $(BUILD_DIR_LIB) \
@USE_OLD_MAKERULES@ $(MIXED_OBJS)
@USE_OLD_MAKERULES@ $(AR) $(ARFLAGS) $@ $(MIXED_OBJS)
@USE_OLD_MAKERULES@ $(STATIC_OBJS)
@USE_OLD_MAKERULES@ $(AR) $(ARFLAGS) $@ $(STATIC_OBJS)
$(BUILD_DIR)/static-ali : ; mkdir -p $@
$(BUILD_DIR)/static-obj : ; mkdir -p $@
@ -245,10 +256,10 @@ STATIC_DIRS = \
@USE_GNAT_PROJECTS@$(BUILD_DIR_LIB)/$(STATIC_LIBNAME) :: \
@USE_GNAT_PROJECTS@ $(ABASE)-trace.adb \
@USE_GNAT_PROJECTS@ $(C_OBJS) \
@USE_GNAT_PROJECTS@ $(STATIC_C_OBJS) \
@USE_GNAT_PROJECTS@ $(STATIC_DIRS)
@USE_GNAT_PROJECTS@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=static
@USE_GNAT_PROJECTS@ $(AR) $(ARFLAGS) $@ $(C_OBJS)
@USE_GNAT_PROJECTS@ $(AR) $(ARFLAGS) $@ $(STATIC_C_OBJS)
@USE_GNAT_PROJECTS@
@USE_GNAT_LIBRARIES@install \
@USE_GNAT_LIBRARIES@install.libs :: \
@ -274,8 +285,11 @@ SHARED_DIRS = \
$(BUILD_DIR)/dynamic-obj
@MAKE_ADA_SHAREDLIB@all :: $(BUILD_DIR_LIB)/$(SHARED_LIBNAME)
@MAKE_ADA_SHAREDLIB@$(BUILD_DIR_LIB)/$(SHARED_LIBNAME) :: $(ABASE)-trace.adb $(SHARED_DIRS)
@MAKE_ADA_SHAREDLIB@ cp $(MIXED_OBJS) $(BUILD_DIR)/dynamic-obj/
@MAKE_ADA_SHAREDLIB@$(BUILD_DIR_LIB)/$(SHARED_LIBNAME) :: \
@MAKE_ADA_SHAREDLIB@ $(ABASE)-trace.adb \
@MAKE_ADA_SHAREDLIB@ $(SHARED_DIRS) \
@MAKE_ADA_SHAREDLIB@ $(SHARED_OBJS)
@MAKE_ADA_SHAREDLIB@ cp $(SHARED_OBJS) $(BUILD_DIR)/dynamic-obj/
@MAKE_ADA_SHAREDLIB@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=dynamic
install \

11
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1693 2011/04/23 22:28:43 tom Exp $
-- $Id: NEWS,v 1.1695 2011/04/30 21:58:29 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,15 @@ See the AUTHORS file for the corresponding full names.
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
20110430
+ modify rules in Ada95/src/Makefile.in to ensure that the PIC option
is not used when building a static library (report by Nicolas
Boulenguez):
+ Ada95 build-fix for big-endian architectures such as sparc. This
undoes one of the fixes from 20110319, which added an "Unused" member
to representation clauses, replacing that with pragmas to suppress
warnings about unused bits (patch by Nicolas Boulenguez):
20110423
+ add check in test/configure for use_window, use_screen.
+ add configure-checks for getopt's variables, which may be declared

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.813 2011/04/23 14:45:18 tom Exp $
# $Id: dist.mk,v 1.814 2011/04/30 18:20:40 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@ -37,7 +37,7 @@ SHELL = /bin/sh
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 9
NCURSES_PATCH = 20110423
NCURSES_PATCH = 20110430
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)