1998-04-30 14:15  Zack Weinberg  <zack@rabi.phys.columbia.edu>

	* sysdeps/unix/sysv/linux/netrose/rose.h: Don't include kernel headers.
This commit is contained in:
Ulrich Drepper 1998-05-01 22:04:20 +00:00
parent f89ac85ca8
commit 97a4786792
8 changed files with 138 additions and 1791 deletions

View File

@ -1,3 +1,7 @@
1998-04-30 14:15 Zack Weinberg <zack@rabi.phys.columbia.edu>
* sysdeps/unix/sysv/linux/netrose/rose.h: Don't include kernel headers.
1998-05-01 Ulrich Drepper <drepper@cygnus.com>
* intl/locale.alias: Update russian entry.

View File

@ -195,11 +195,12 @@ $(objpfx)version-info.h: $(+sysdir_pfx)config.make $(all-Banner-files)
version.c-objects := $(addprefix $(objpfx)version,$(object-suffixes))
$(version.c-objects): $(objpfx)version-info.h
# Makerules creates a file `stub-$(subdir)' for each subdirectory, which
# contains `#define __stub_FUNCTION' for each function which is a stub.
# Makerules creates a file `stubs' in each subdirectory, which
# contains `#define __stub_FUNCTION' for each function defined in that
# directory which is a stub.
# Here we paste all of these together into <gnu/stubs.h>.
subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)stub-$(dir))
subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
# Since stubs.h is never needed when building the library, we simplify the
# hairy installation process by producing it in place only as the last part

113
Makerules
View File

@ -72,15 +72,6 @@ endif
# `+includes' in Makeconfig references $(+sysdep-includes).
+sysdep-includes := $(addprefix -I,$(+sysdep_dirs))
# The name of the symbol table archive member. The default is suitable for
# BSD style archives. It can be overridden in sysdep Makefiles when SYSV
# style archive are used.
ifeq (no,$(elf))
ar-symtab-name = __.SYMDEF
else
ar-symtab-name = # The null name is used in ELF archives.
endif
# This variable is used in ``include $(o-iterator)'' after defining
# $(o-iterator-doit) to produce some desired rule using $o for the object
# suffix, and setting $(object-suffixes-left) to $(object-suffixes); a copy
@ -382,20 +373,14 @@ elide-routines.oS = $(filter-out $(static-only-routines),\
$(routines) $(aux) $(sysdep_routines))
ifdef static-only-routines
# These routines are to be omitted from the shared library object,
# so we replace the PIC objects for them with the empty object file.
$(static-only-routines:%=$(objpfx)%.os): %.os: $(common-objpfx)empty.os
rm -f $@
ln $< $@
elide-routines.os += $(static-only-routines)
endif
ifdef shared-only-routines
# If we have versioned code we don't need the old versions in any of the
# static libraries.
define o-iterator-doit
$(shared-only-routines:%=$(objpfx)%$o): %$o: $(common-objpfx)empty$o;
rm -f $$@
ln $$< $$@
elide-routines.$o := $(shared-only-routines)
endef
object-suffixes-left := $(filter-out .os,$(object-suffixes))
include $(o-iterator)
@ -510,29 +495,18 @@ verbose :=
endif # not -s
ARFLAGS := r$(verbose)
ifeq ($(have-ar-S),yes)
CREATE_ARFLAGS := Scru$(verbose)
else
CREATE_ARFLAGS := cru$(verbose)
endif
# This makes all the object files in the parent library archive.
.PHONY: lib libobjs lib-noranlib
.PHONY: lib lib-noranlib
lib: lib-noranlib $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
# Pattern rule for libraries: depend on the __.SYMDEF member updated by ranlib.
lib%.a: lib%.a($(ar-symtab-name)) ;
# For object-suffix $o, the list of objects with that suffix.
# Makefiles can define `elide-routines.so = foo' to leave foo.so out.
o-objects = $(patsubst %.o,%$o,$(filter-out $(patsubst %,$(objpfx)%.o,\
$(elide-routines$o)),\
$(objects)))
libobjs: $(foreach o,$(object-suffixes-for-libc),\
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
$(notdir $(o-objects))))
lib-noranlib: libobjs
others: $(addprefix $(objpfx),$(install-lib))
@ -545,26 +519,17 @@ $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o):
rm -f $@; > $@
else
# Define a pattern rule that will match many targets libc.a(foo.%), for
# each foo.o in $(objects) (% will just happen always to match `o'). This is
# the only way to define a rule that updates many targets at once with one
# sequence of commands.
define o-iterator-doit
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
$(addsuffix .%,$(filter-out $(elide-routines$o),$(notdir $(objects:.o=))))): \
$(objpfx)stamp.% ;
endef
object-suffixes-left := $(object-suffixes-for-libc)
include $(o-iterator)
# The pattern rule tells Make to remake $(objpfx)stamp.% as
# the way to update all the foo.% object files in $(objects). Now we
# define explicit rules to update each $(objpfx)stamp.SUFFIX
# Define explicit rules to update each $(objpfx)stamp.SUFFIX
# timestamp file; these rules (one explicit rule is generated for each
# object suffix) will update the parent archive with ar. Use a static
# pattern rule so $* is set to the object type during the commands.
# object suffix) write a list of objects to update in the stamp file.
# The parent will then actually add them all to the archive in the
# archive rule, below.
define o-iterator-doit
$(objpfx)stamp$o: $(objpfx)stamp%: $(o-objects); $$(do-ar)
$(objpfx)stamp$o: $(o-objects); $$(do-stamp)
endef
define do-stamp
echo '$(patsubst $(common-objpfx)%,%,$^)' > $@T
mv -f $@T $@
endef
ifdef static-only-routines
object-suffixes-left := $(object-suffixes-for-libc)
@ -572,15 +537,6 @@ else
object-suffixes-left := $(object-suffixes)
endif
include $(o-iterator)
define do-ar
topdir=`cd $(..). && pwd`; \
$(patsubst %/,cd % &&,$(objpfx)) \
$(SHELL) $$topdir/autolock.sh ${O%-lib}.lck $(AR) $(CREATE_ARFLAGS) ${O%-lib} \
$(patsubst $(objpfx)%,%,$?)
rm -f $@
touch $@
endef
O%-lib = $(..)$(patsubst %,$(libtype$*),c)
ifndef static-only-routines
subdir_lib: $(objpfx)stamp.oS
@ -591,29 +547,42 @@ endif
endif
# Rules to update the $(ar-symtab-name) member with ranlib,
# one for each object flavor.
# Now define explicit rules to build the library archives; these depend
# on the stamp files built above. The rule always destroys and recreates
# the library from scratch; it's faster (!) that way.
define o-iterator-doit
$(common-objpfx)$(patsubst %,$(libtype$o),c)($(ar-symtab-name)): \
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
$(patsubst $(objpfx)%,%,$(o-objects))) $(subdirs-stamp-o); \
$(SHELL) $$(..)./autolock.sh \
$$(common-objpfx)$$(patsubst %,$$(libtype$o),c).lck \
$$(RANLIB) $$(common-objpfx)$$(patsubst %,$$(libtype$o),c)
$(common-objpfx)$(patsubst %,$(libtype$o),c): \
$(subdirs-stamp-o) $(common-objpfx)stamp$o; $$(do-makelib)
endef
define do-makelib
(set -e; cd $(common-objdir); \
$(AR) $(CREATE_ARFLAGS) $(@F)T \
`cat $(patsubst $(common-objpfx)%,%,$^)`; \
$(RANLIB) $(@F)T; \
mv -f $(@F)T $(@F))
endef
ifndef subdir
subdirs-stamps := $(foreach d,$(subdirs),$(common-objpfx)$d/stamp%)
subdirs-stamp-o = $(subst %,$o,$(subdirs-stamps))
$(subdirs-stamps): subdir_lib;
endif
# The elf directory needs to know subdirs-stamp-o; otherwise libc_pic.a
# is mangled. FIXME: It would be cleaner to move the final construction
# of ld.so to top level.
ifeq ($(subdir),elf)
subdirs-stamps := $(foreach d,$(subdirs),$(common-objpfx)$d/stamp%)
subdirs-stamp-o = $(subst %,$o,$(subdirs-stamps))
endif
object-suffixes-left = $(object-suffixes-for-libc)
include $(o-iterator)
# This makes all the object files.
.PHONY: objects objs
objects objs: $(foreach o,$(object-suffixes-for-libc),$(o-objects)) \
$(addprefix $(objpfx),$(extra-objs))
.PHONY: objects objs libobjs extra-objs
objects objs: libobjs extra-objs
libobjs: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
extra-objs: $(addprefix $(objpfx),$(extra-objs))
# Canned sequence for building an extra library archive.
define build-extra-lib
@ -945,7 +914,7 @@ mostlyclean: common-mostlyclean
# Remove the object files.
common-mostlyclean:
-rm -f $(addprefix $(objpfx),$(tests) $(test-srcs) $(others) \
$(tests-static) \
$(tests-static) stubs \
$(addsuffix .o,$(tests) $(test-srcs) \
$(tests-static) \
$(others)) \
@ -954,7 +923,7 @@ common-mostlyclean:
-rm -f $(addprefix $(objpfx),$(extra-objs) $(install-lib) \
$(install-lib.so) \
$(install-lib.so:%.so=%_pic.a))
-rm -f core $(common-objpfx)stub-$(subdir)
-rm -f core
$(rmobjs)
define rmobjs
$(foreach o,$(object-suffixes-for-libc),
@ -968,15 +937,15 @@ common-clean: common-mostlyclean
-rm -f $(addprefix $(common-objpfx),$(common-generated))
-rm -f $(objpfx)distinfo
# Produce a file `stub-$(subdir)' which contains `#define __stub_FUNCTION'
# Produce a file `stubs' which contains `#define __stub_FUNCTION'
# for each function which is a stub. We grovel over all the .d files
# looking for references to <stub-tag.h>. Then we grovel over each
# referenced source file to see what stub function it defines.
.PHONY: stubs # The parent Makefile calls this target.
stubs: $(common-objpfx)stub-$(subdir)
stubs: $(objpfx)stubs
s = $(sysdep_dir)/generic
$(common-objpfx)stub-$(subdir): $(+depfiles)
$(objpfx)stubs: $(+depfiles)
# Use /dev/null since `...` might expand to empty.
(s=`cd $s && /bin/pwd`; \
$(patsubst %/,cd % &&,$(objpfx)) \

View File

@ -35,7 +35,6 @@ with-cvs = @with_cvs@
versioning = @VERSIONING@
have-ar-S=@libc_cv_ar_S@
have-no-whole-archive = @libc_cv_ld_no_whole_archive@
have-no-exceptions = @libc_cv_gcc_no_exceptions@
have-bash2 = @libc_cv_have_bash2@

View File

@ -492,19 +492,26 @@ if test -n "$sysheaders"; then
fi
AC_SUBST(SYSINCLUDES)
# check if ar takes S
AC_CACHE_CHECK(for ar S, libc_cv_ar_S, [dnl
tmpo=$$.o
tmplib=lib$$.a
rm -f $tmpo $tmplib
touch $tmpo
if AC_TRY_COMMAND([${AR-ar} rcuS $tmplib $tmpo > /dev/null 2>&1]); then
libc_cv_ar_S=yes
# check if ranlib is necessary
AC_CACHE_CHECK(whether ranlib is necessary, libc_cv_ranlib_necessary, [dnl
cat > conftest.c <<EOF
int a;
char b;
void c(void) {}
EOF
$CC $CFLAGS -c conftest.c
$AR cr conftest.a conftest.c
cp conftest.a conftest2.a
$RANLIB conftest.a
if cmp -s conftest.a conftest2.a; then
libc_cv_ranlib_necessary=no
else
libc_cv_ar_S=no
libc_cv_ranlib_necessary=yes
fi
rm -rf conftest*])
if test "$libc_cv_ranlib_necessary" = no; then
RANLIB=:
fi
rm -f $tmpo $tmplib])
AC_SUBST(libc_cv_ar_S)dnl
# Test if LD_LIBRARY_PATH contains the notation for the current directory
# since this would lead to problems installing/building glibc.

File diff suppressed because it is too large Load Diff

View File

@ -141,7 +141,7 @@ glibc-doc-$(edition).tar: $(doc-only-dist) $(distribute)
.PHONY: mostlyclean distclean realclean clean
mostlyclean:
-rm -f libc.dvi libc.info* dir-add.info $(common-objpfx)stub-manual
-rm -f libc.dvi libc.info* dir-add.info stubs
-rm -f $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
clean: mostlyclean
distclean: clean
@ -206,8 +206,8 @@ $(glibc-targets):
# updating the library archives are happy with us, and never think we have
# changed the library.
lib: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
stubs: $(common-objpfx)stub-manual
$(common-objpfx)stub-manual ../po/manual.pot $(objpfx)stamp%:
stubs: $(objpfx)stubs
$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
$(make-target-directory)
cp /dev/null $@

View File

@ -17,12 +17,76 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* What follows is copied from the 2.1.93 <linux/rose.h>. */
#ifndef _NETROSE_ROSE_H
#define _NETROSE_ROSE_H 1
#include <linux/rose.h> /* Ask, and the kernel will provide. */
/* Socket level values. */
#define SOL_ROSE 260
#endif
/* These are the public elements of the Linux kernel Rose
implementation. For kernel AX.25 see the file ax25.h. This file
requires ax25.h for the definition of the ax25_address structure. */
#define ROSE_MTU 251
#define ROSE_DEFER 1
#define ROSE_T1 2
#define ROSE_T2 3
#define ROSE_T3 4
#define ROSE_IDLE 5
#define ROSE_QBITINCL 6
#define ROSE_HOLDBACK 7
#define SIOCRSGCAUSE (SIOCPROTOPRIVATE + 0)
#define SIOCRSSCAUSE (SIOCPROTOPRIVATE + 1)
#define SIOCRSL2CALL (SIOCPROTOPRIVATE + 2)
#define SIOCRSSL2CALL (SIOCPROTOPRIVATE + 2)
#define SIOCRSACCEPT (SIOCPROTOPRIVATE + 3)
#define SIOCRSCLRRT (SIOCPROTOPRIVATE + 4)
#define SIOCRSGL2CALL (SIOCPROTOPRIVATE + 5)
#define ROSE_DTE_ORIGINATED 0x00
#define ROSE_NUMBER_BUSY 0x01
#define ROSE_INVALID_FACILITY 0x03
#define ROSE_NETWORK_CONGESTION 0x05
#define ROSE_OUT_OF_ORDER 0x09
#define ROSE_ACCESS_BARRED 0x0B
#define ROSE_NOT_OBTAINABLE 0x0D
#define ROSE_REMOTE_PROCEDURE 0x11
#define ROSE_LOCAL_PROCEDURE 0x13
#define ROSE_SHIP_ABSENT 0x39
typedef struct
{
char rose_addr[5];
} rose_address;
struct sockaddr_rose
{
sa_family_t srose_family;
rose_address srose_addr;
ax25_address srose_call;
int srose_ndigis;
ax25_address srose_digi;
};
struct rose_route_struct
{
rose_address address;
unsigned short int mask;
ax25_address neighbour;
char device[16];
unsigned char ndigis;
ax25_address digipeaters[AX25_MAX_DIGIS];
};
struct rose_cause_struct
{
unsigned char cause;
unsigned char diagnostic;
};
#endif /* netrose/rose.h */