Update to libICE 1.0.9
This commit is contained in:
parent
0a4adec844
commit
5a14c2ef39
@ -1,3 +1,183 @@
|
|||||||
|
commit 0dfab4253e26d5c6e5f058126eb5e9f7a7732ae8
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Fri Jun 6 18:28:28 2014 -0700
|
||||||
|
|
||||||
|
libICE 1.0.9
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 9fb6ba03d7183ae06644f8a747fdb99b970d65fc
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Tue Dec 24 09:35:02 2013 -0800
|
||||||
|
|
||||||
|
Delete unused name variable in register.c
|
||||||
|
|
||||||
|
Found by cppcheck 1.62:
|
||||||
|
[src/register.c:84]: (style) Variable 'name' is assigned a value
|
||||||
|
that is never used.
|
||||||
|
[src/register.c:182]: (style) Variable 'name' is assigned a value
|
||||||
|
that is never used.
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit c5060918164168c0a4f737b76e92df3c03356dc6
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Tue Dec 24 09:18:17 2013 -0800
|
||||||
|
|
||||||
|
Free iceConn->connection_string when unwinding after malloc fails
|
||||||
|
|
||||||
|
Found by cppcheck 1.62:
|
||||||
|
[src/accept.c:113]: (error) Memory leak: iceConn.connection_string
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 80f62c54fbd50a3bbdf9c37258525098c9117830
|
||||||
|
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
|
||||||
|
Date: Thu Aug 29 22:18:14 2013 +0200
|
||||||
|
|
||||||
|
Use arc4random when available to produce the auth cookie.
|
||||||
|
|
||||||
|
arc4random() and associated functions can be found in libbsd on
|
||||||
|
GNU/Linux systems.
|
||||||
|
|
||||||
|
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
|
||||||
|
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 2312ee00402088307e69589c3d12529b5232df66
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Thu Aug 8 23:01:30 2013 -0700
|
||||||
|
|
||||||
|
Make STORE_STRING cast strlen result to CARD16 when storing in CARD16
|
||||||
|
|
||||||
|
Clears a number of clang warnings of the form:
|
||||||
|
|
||||||
|
connect.c:328:6: warning: implicit conversion loses integer precision:
|
||||||
|
'size_t' (aka 'unsigned long') to 'CARD16' (aka 'unsigned short')
|
||||||
|
[-Wconversion]
|
||||||
|
STORE_STRING (pData, _IceAuthNames[i]);
|
||||||
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
./ICElibint.h:173:19: note: expanded from macro 'STORE_STRING'
|
||||||
|
CARD16 _len = strlen (_string); \
|
||||||
|
~~~~ ^~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 6d6aa84dc6acb2daa3ef7e20942c38a1416bf543
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Thu Aug 8 22:58:46 2013 -0700
|
||||||
|
|
||||||
|
Cast assignments in IceErrorHeader() macro
|
||||||
|
|
||||||
|
Clears many clang warnings about implicit conversions losing
|
||||||
|
integer precision, such as from storing ints into CARD8 or CARD16.
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 9450bb648ef98efd6f08ea7d14ab8b9ea6e7bb54
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Thu Aug 8 22:47:41 2013 -0700
|
||||||
|
|
||||||
|
Make write_string call write_counted_string instead of copying it
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 84153eee4db318cd897c464e70cb9f8bc8e469f6
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Thu Aug 8 22:37:09 2013 -0700
|
||||||
|
|
||||||
|
Mark input arguments to write_string functions as const
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 9a74512ffdc1628f1b87d2191439915c63b9104f
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Thu Aug 8 22:31:41 2013 -0700
|
||||||
|
|
||||||
|
Stop casting return values from malloc
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 4033226105fa861ab5f0276850afc24c0fa45406
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Thu Aug 8 22:17:27 2013 -0700
|
||||||
|
|
||||||
|
Get rid of casts to (char *) in calls to free()
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 10c30ae6a7df1a7c352a1d611a313dffcaa42082
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Sat Jul 20 14:48:33 2013 -0700
|
||||||
|
|
||||||
|
Convert remaining sprintf() call to snprintf()
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 0a94633e3d805ca477fba6b7acb673d055a3f43d
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Sat Jul 20 14:46:09 2013 -0700
|
||||||
|
|
||||||
|
Convert strcpy/strcat pairs to snprintf calls
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 0d276835222eeb57de56f56cd9e12611b1d30466
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Sat Jul 20 14:35:11 2013 -0700
|
||||||
|
|
||||||
|
Fix some clang warnings about integer sign/size conversions
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit bb3d8a7767cf260b97c7e019e4fec0ee7d7b65a8
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Sat Jul 20 14:24:04 2013 -0700
|
||||||
|
|
||||||
|
unifdef WORD64
|
||||||
|
|
||||||
|
Remove leftover remnants of CRAY support, which still had some
|
||||||
|
functions consisting solely of /* NOT IMPLEMENTED YET */ comments.
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
|
commit 9561eca1ad28afee6dcd0aebea3dd20a154ec481
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Thu Jul 18 00:36:28 2013 -0700
|
||||||
|
|
||||||
|
Constify filename argument to IceLockAuthFile & IceUnlockAuthFile
|
||||||
|
|
||||||
|
Needed to fix const string warnings in iceauth - functions already
|
||||||
|
copy provided arguments to temporary local buffer for modifications.
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
||||||
|
|
||||||
|
commit 1b1cf8072b2559e15ac440d5484a29a81d6918c6
|
||||||
|
Author: Colin Walters <walters@verbum.org>
|
||||||
|
Date: Wed Jan 4 17:37:06 2012 -0500
|
||||||
|
|
||||||
|
autogen.sh: Implement GNOME Build API
|
||||||
|
|
||||||
|
http://people.gnome.org/~walters/docs/build-api.txt
|
||||||
|
|
||||||
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||||
|
|
||||||
|
commit 5e784ca7f37823e62733765371c0b8ed1c58e5aa
|
||||||
|
Author: Adam Jackson <ajax@redhat.com>
|
||||||
|
Date: Tue Jan 15 14:28:48 2013 -0500
|
||||||
|
|
||||||
|
configure: Remove AM_MAINTAINER_MODE
|
||||||
|
|
||||||
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||||
|
|
||||||
|
commit e1677ce019219ac164d99f1e04f17caf16fc785a
|
||||||
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
Date: Fri Jan 4 19:32:08 2013 -0800
|
||||||
|
|
||||||
|
unifdef -U__UNIXOS2__
|
||||||
|
|
||||||
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
|
|
||||||
commit f166e8bbf16ec214fefdcf02ce81f80442899cb7
|
commit f166e8bbf16ec214fefdcf02ce81f80442899cb7
|
||||||
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
|
||||||
Date: Fri Mar 2 19:59:50 2012 -0800
|
Date: Fri Mar 2 19:59:50 2012 -0800
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
Installation Instructions
|
Installation Instructions
|
||||||
*************************
|
*************************
|
||||||
|
|
||||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
|
||||||
2006, 2007, 2008 Free Software Foundation, Inc.
|
Inc.
|
||||||
|
|
||||||
This file is free documentation; the Free Software Foundation gives
|
Copying and distribution of this file, with or without modification,
|
||||||
unlimited permission to copy, distribute and modify it.
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved. This file is offered as-is,
|
||||||
|
without warranty of any kind.
|
||||||
|
|
||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
@ -13,7 +15,11 @@ Basic Installation
|
|||||||
Briefly, the shell commands `./configure; make; make install' should
|
Briefly, the shell commands `./configure; make; make install' should
|
||||||
configure, build, and install this package. The following
|
configure, build, and install this package. The following
|
||||||
more-detailed instructions are generic; see the `README' file for
|
more-detailed instructions are generic; see the `README' file for
|
||||||
instructions specific to this package.
|
instructions specific to this package. Some packages provide this
|
||||||
|
`INSTALL' file but do not implement all of the features documented
|
||||||
|
below. The lack of an optional feature in a given package is not
|
||||||
|
necessarily a bug. More recommendations for GNU packages can be found
|
||||||
|
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||||
|
|
||||||
The `configure' shell script attempts to guess correct values for
|
The `configure' shell script attempts to guess correct values for
|
||||||
various system-dependent variables used during compilation. It uses
|
various system-dependent variables used during compilation. It uses
|
||||||
@ -42,7 +48,7 @@ may remove or edit it.
|
|||||||
you want to change it or regenerate `configure' using a newer version
|
you want to change it or regenerate `configure' using a newer version
|
||||||
of `autoconf'.
|
of `autoconf'.
|
||||||
|
|
||||||
The simplest way to compile this package is:
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
1. `cd' to the directory containing the package's source code and type
|
1. `cd' to the directory containing the package's source code and type
|
||||||
`./configure' to configure the package for your system.
|
`./configure' to configure the package for your system.
|
||||||
@ -53,12 +59,22 @@ The simplest way to compile this package is:
|
|||||||
2. Type `make' to compile the package.
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
3. Optionally, type `make check' to run any self-tests that come with
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
the package.
|
the package, generally using the just-built uninstalled binaries.
|
||||||
|
|
||||||
4. Type `make install' to install the programs and any data files and
|
4. Type `make install' to install the programs and any data files and
|
||||||
documentation.
|
documentation. When installing into a prefix owned by root, it is
|
||||||
|
recommended that the package be configured and built as a regular
|
||||||
|
user, and only the `make install' phase executed with root
|
||||||
|
privileges.
|
||||||
|
|
||||||
5. You can remove the program binaries and object files from the
|
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||||
|
this time using the binaries in their final installed location.
|
||||||
|
This target does not install anything. Running this target as a
|
||||||
|
regular user, particularly if the prior `make install' required
|
||||||
|
root privileges, verifies that the installation completed
|
||||||
|
correctly.
|
||||||
|
|
||||||
|
6. You can remove the program binaries and object files from the
|
||||||
source code directory by typing `make clean'. To also remove the
|
source code directory by typing `make clean'. To also remove the
|
||||||
files that `configure' created (so you can compile the package for
|
files that `configure' created (so you can compile the package for
|
||||||
a different kind of computer), type `make distclean'. There is
|
a different kind of computer), type `make distclean'. There is
|
||||||
@ -67,8 +83,15 @@ The simplest way to compile this package is:
|
|||||||
all sorts of other programs in order to regenerate files that came
|
all sorts of other programs in order to regenerate files that came
|
||||||
with the distribution.
|
with the distribution.
|
||||||
|
|
||||||
6. Often, you can also type `make uninstall' to remove the installed
|
7. Often, you can also type `make uninstall' to remove the installed
|
||||||
files again.
|
files again. In practice, not all packages have tested that
|
||||||
|
uninstallation works correctly, even though it is required by the
|
||||||
|
GNU Coding Standards.
|
||||||
|
|
||||||
|
8. Some packages, particularly those that use Automake, provide `make
|
||||||
|
distcheck', which can by used by developers to test that all other
|
||||||
|
targets like `make install' and `make uninstall' work correctly.
|
||||||
|
This target is generally not run by end users.
|
||||||
|
|
||||||
Compilers and Options
|
Compilers and Options
|
||||||
=====================
|
=====================
|
||||||
@ -93,7 +116,8 @@ same time, by placing the object files for each architecture in their
|
|||||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||||
directory where you want the object files and executables to go and run
|
directory where you want the object files and executables to go and run
|
||||||
the `configure' script. `configure' automatically checks for the
|
the `configure' script. `configure' automatically checks for the
|
||||||
source code in the directory that `configure' is in and in `..'.
|
source code in the directory that `configure' is in and in `..'. This
|
||||||
|
is known as a "VPATH" build.
|
||||||
|
|
||||||
With a non-GNU `make', it is safer to compile the package for one
|
With a non-GNU `make', it is safer to compile the package for one
|
||||||
architecture at a time in the source code directory. After you have
|
architecture at a time in the source code directory. After you have
|
||||||
@ -120,7 +144,8 @@ Installation Names
|
|||||||
By default, `make install' installs the package's commands under
|
By default, `make install' installs the package's commands under
|
||||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||||
can specify an installation prefix other than `/usr/local' by giving
|
can specify an installation prefix other than `/usr/local' by giving
|
||||||
`configure' the option `--prefix=PREFIX'.
|
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||||
|
absolute file name.
|
||||||
|
|
||||||
You can specify separate installation prefixes for
|
You can specify separate installation prefixes for
|
||||||
architecture-specific files and architecture-independent files. If you
|
architecture-specific files and architecture-independent files. If you
|
||||||
@ -131,15 +156,46 @@ Documentation and other data files still use the regular prefix.
|
|||||||
In addition, if you use an unusual directory layout you can give
|
In addition, if you use an unusual directory layout you can give
|
||||||
options like `--bindir=DIR' to specify different values for particular
|
options like `--bindir=DIR' to specify different values for particular
|
||||||
kinds of files. Run `configure --help' for a list of the directories
|
kinds of files. Run `configure --help' for a list of the directories
|
||||||
you can set and what kinds of files go in them.
|
you can set and what kinds of files go in them. In general, the
|
||||||
|
default for these options is expressed in terms of `${prefix}', so that
|
||||||
|
specifying just `--prefix' will affect all of the other directory
|
||||||
|
specifications that were not explicitly provided.
|
||||||
|
|
||||||
|
The most portable way to affect installation locations is to pass the
|
||||||
|
correct locations to `configure'; however, many packages provide one or
|
||||||
|
both of the following shortcuts of passing variable assignments to the
|
||||||
|
`make install' command line to change installation locations without
|
||||||
|
having to reconfigure or recompile.
|
||||||
|
|
||||||
|
The first method involves providing an override variable for each
|
||||||
|
affected directory. For example, `make install
|
||||||
|
prefix=/alternate/directory' will choose an alternate location for all
|
||||||
|
directory configuration variables that were expressed in terms of
|
||||||
|
`${prefix}'. Any directories that were specified during `configure',
|
||||||
|
but not in terms of `${prefix}', must each be overridden at install
|
||||||
|
time for the entire installation to be relocated. The approach of
|
||||||
|
makefile variable overrides for each directory variable is required by
|
||||||
|
the GNU Coding Standards, and ideally causes no recompilation.
|
||||||
|
However, some platforms have known limitations with the semantics of
|
||||||
|
shared libraries that end up requiring recompilation when using this
|
||||||
|
method, particularly noticeable in packages that use GNU Libtool.
|
||||||
|
|
||||||
|
The second method involves providing the `DESTDIR' variable. For
|
||||||
|
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||||
|
`/alternate/directory' before all installation names. The approach of
|
||||||
|
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||||
|
does not work on platforms that have drive letters. On the other hand,
|
||||||
|
it does better at avoiding recompilation issues, and works well even
|
||||||
|
when some directory options were not specified in terms of `${prefix}'
|
||||||
|
at `configure' time.
|
||||||
|
|
||||||
|
Optional Features
|
||||||
|
=================
|
||||||
|
|
||||||
If the package supports it, you can cause programs to be installed
|
If the package supports it, you can cause programs to be installed
|
||||||
with an extra prefix or suffix on their names by giving `configure' the
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
Optional Features
|
|
||||||
=================
|
|
||||||
|
|
||||||
Some packages pay attention to `--enable-FEATURE' options to
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
`configure', where FEATURE indicates an optional part of the package.
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
@ -152,6 +208,13 @@ find the X include and library files automatically, but if it doesn't,
|
|||||||
you can use the `configure' options `--x-includes=DIR' and
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
`--x-libraries=DIR' to specify their locations.
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Some packages offer the ability to configure how verbose the
|
||||||
|
execution of `make' will be. For these packages, running `./configure
|
||||||
|
--enable-silent-rules' sets the default to minimal output, which can be
|
||||||
|
overridden with `make V=1'; while running `./configure
|
||||||
|
--disable-silent-rules' sets the default to verbose, which can be
|
||||||
|
overridden with `make V=0'.
|
||||||
|
|
||||||
Particular systems
|
Particular systems
|
||||||
==================
|
==================
|
||||||
|
|
||||||
@ -159,10 +222,15 @@ Particular systems
|
|||||||
CC is not installed, it is recommended to use the following options in
|
CC is not installed, it is recommended to use the following options in
|
||||||
order to use an ANSI C compiler:
|
order to use an ANSI C compiler:
|
||||||
|
|
||||||
./configure CC="cc -Ae"
|
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||||
|
|
||||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||||
|
|
||||||
|
HP-UX `make' updates targets which have the same time stamps as
|
||||||
|
their prerequisites, which makes it generally unusable when shipped
|
||||||
|
generated files such as `configure' are involved. Use GNU `make'
|
||||||
|
instead.
|
||||||
|
|
||||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||||
@ -174,6 +242,16 @@ and if that doesn't work, try
|
|||||||
|
|
||||||
./configure CC="cc -nodtk"
|
./configure CC="cc -nodtk"
|
||||||
|
|
||||||
|
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||||
|
directory contains several dysfunctional programs; working variants of
|
||||||
|
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||||
|
in your `PATH', put it _after_ `/usr/bin'.
|
||||||
|
|
||||||
|
On Haiku, software installed for all users goes in `/boot/common',
|
||||||
|
not `/usr/local'. It is recommended to use the following options:
|
||||||
|
|
||||||
|
./configure --prefix=/boot/common
|
||||||
|
|
||||||
Specifying the System Type
|
Specifying the System Type
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
@ -189,7 +267,8 @@ type, such as `sun4', or a canonical name which has the form:
|
|||||||
|
|
||||||
where SYSTEM can have one of these forms:
|
where SYSTEM can have one of these forms:
|
||||||
|
|
||||||
OS KERNEL-OS
|
OS
|
||||||
|
KERNEL-OS
|
||||||
|
|
||||||
See the file `config.sub' for the possible values of each field. If
|
See the file `config.sub' for the possible values of each field. If
|
||||||
`config.sub' isn't included in this package, then this package doesn't
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
@ -277,7 +356,7 @@ operates.
|
|||||||
`configure' can determine that directory automatically.
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
`--prefix=DIR'
|
`--prefix=DIR'
|
||||||
Use DIR as the installation prefix. *Note Installation Names::
|
Use DIR as the installation prefix. *note Installation Names::
|
||||||
for more details, including other options available for fine-tuning
|
for more details, including other options available for fine-tuning
|
||||||
the installation locations.
|
the installation locations.
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ subdir = .
|
|||||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||||
$(srcdir)/ice.pc.in $(top_srcdir)/configure AUTHORS COPYING \
|
$(srcdir)/ice.pc.in $(top_srcdir)/configure AUTHORS COPYING \
|
||||||
ChangeLog INSTALL NEWS config.guess config.sub depcomp \
|
ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
|
||||||
install-sh ltmain.sh missing
|
install-sh ltmain.sh missing
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
@ -231,7 +231,6 @@ LINT_FLAGS = @LINT_FLAGS@
|
|||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
MAINT = @MAINT@
|
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
MAN_SUBSTS = @MAN_SUBSTS@
|
MAN_SUBSTS = @MAN_SUBSTS@
|
||||||
@ -330,7 +329,7 @@ all: config.h
|
|||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
am--refresh: Makefile
|
am--refresh: Makefile
|
||||||
@:
|
@:
|
||||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
@for dep in $?; do \
|
@for dep in $?; do \
|
||||||
case '$(am__configure_deps)' in \
|
case '$(am__configure_deps)' in \
|
||||||
*$$dep*) \
|
*$$dep*) \
|
||||||
@ -357,9 +356,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
$(SHELL) ./config.status --recheck
|
$(SHELL) ./config.status --recheck
|
||||||
|
|
||||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
@ -370,7 +369,7 @@ config.h: stamp-h1
|
|||||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||||
@rm -f stamp-h1
|
@rm -f stamp-h1
|
||||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||||
rm -f stamp-h1
|
rm -f stamp-h1
|
||||||
touch $@
|
touch $@
|
||||||
|
161
lib/libICE/aclocal.m4
vendored
161
lib/libICE/aclocal.m4
vendored
@ -9386,44 +9386,6 @@ fi
|
|||||||
rmdir .tst 2>/dev/null
|
rmdir .tst 2>/dev/null
|
||||||
AC_SUBST([am__leading_dot])])
|
AC_SUBST([am__leading_dot])])
|
||||||
|
|
||||||
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
|
|
||||||
# From Jim Meyering
|
|
||||||
|
|
||||||
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
|
|
||||||
#
|
|
||||||
# This file is free software; the Free Software Foundation
|
|
||||||
# gives unlimited permission to copy and/or distribute it,
|
|
||||||
# with or without modifications, as long as this notice is preserved.
|
|
||||||
|
|
||||||
# AM_MAINTAINER_MODE([DEFAULT-MODE])
|
|
||||||
# ----------------------------------
|
|
||||||
# Control maintainer-specific portions of Makefiles.
|
|
||||||
# Default is to disable them, unless 'enable' is passed literally.
|
|
||||||
# For symmetry, 'disable' may be passed as well. Anyway, the user
|
|
||||||
# can override the default with the --enable/--disable switch.
|
|
||||||
AC_DEFUN([AM_MAINTAINER_MODE],
|
|
||||||
[m4_case(m4_default([$1], [disable]),
|
|
||||||
[enable], [m4_define([am_maintainer_other], [disable])],
|
|
||||||
[disable], [m4_define([am_maintainer_other], [enable])],
|
|
||||||
[m4_define([am_maintainer_other], [enable])
|
|
||||||
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
|
|
||||||
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
|
|
||||||
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
|
|
||||||
AC_ARG_ENABLE([maintainer-mode],
|
|
||||||
[AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
|
|
||||||
am_maintainer_other[ make rules and dependencies not useful
|
|
||||||
(and sometimes confusing) to the casual installer])],
|
|
||||||
[USE_MAINTAINER_MODE=$enableval],
|
|
||||||
[USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
|
|
||||||
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
|
|
||||||
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
|
|
||||||
MAINT=$MAINTAINER_MODE_TRUE
|
|
||||||
AC_SUBST([MAINT])dnl
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
|
||||||
|
|
||||||
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
# Check to see how 'make' treats includes. -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
|
||||||
@ -9830,7 +9792,7 @@ AC_SUBST([am__untar])
|
|||||||
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
|
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
|
||||||
dnl
|
dnl
|
||||||
dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||||
dnl
|
dnl
|
||||||
dnl Permission is hereby granted, free of charge, to any person obtaining a
|
dnl Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
dnl copy of this software and associated documentation files (the "Software"),
|
dnl copy of this software and associated documentation files (the "Software"),
|
||||||
dnl to deal in the Software without restriction, including without limitation
|
dnl to deal in the Software without restriction, including without limitation
|
||||||
@ -9863,10 +9825,10 @@ dnl DEALINGS IN THE SOFTWARE.
|
|||||||
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# See the "minimum version" comment for each macro you use to see what
|
# See the "minimum version" comment for each macro you use to see what
|
||||||
# version you require.
|
# version you require.
|
||||||
m4_defun([XORG_MACROS_VERSION],[
|
m4_defun([XORG_MACROS_VERSION],[
|
||||||
m4_define([vers_have], [1.16.2])
|
m4_define([vers_have], [1.19.0])
|
||||||
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
|
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
|
||||||
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
|
||||||
m4_if(m4_cmp(maj_have, maj_needed), 0,,
|
m4_if(m4_cmp(maj_have, maj_needed), 0,,
|
||||||
@ -9886,7 +9848,7 @@ m4_undefine([maj_needed])
|
|||||||
# such as man pages and config files
|
# such as man pages and config files
|
||||||
AC_DEFUN([XORG_PROG_RAWCPP],[
|
AC_DEFUN([XORG_PROG_RAWCPP],[
|
||||||
AC_REQUIRE([AC_PROG_CPP])
|
AC_REQUIRE([AC_PROG_CPP])
|
||||||
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
|
AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}],
|
||||||
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
|
[$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
|
||||||
|
|
||||||
# Check for flag to avoid builtin definitions - assumes unix is predefined,
|
# Check for flag to avoid builtin definitions - assumes unix is predefined,
|
||||||
@ -9916,6 +9878,7 @@ if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
|||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
else
|
else
|
||||||
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then
|
||||||
|
TRADITIONALCPPFLAGS="-traditional"
|
||||||
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
|
RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
else
|
else
|
||||||
@ -9924,6 +9887,7 @@ else
|
|||||||
fi
|
fi
|
||||||
rm -f conftest.$ac_ext
|
rm -f conftest.$ac_ext
|
||||||
AC_SUBST(RAWCPPFLAGS)
|
AC_SUBST(RAWCPPFLAGS)
|
||||||
|
AC_SUBST(TRADITIONALCPPFLAGS)
|
||||||
]) # XORG_PROG_RAWCPP
|
]) # XORG_PROG_RAWCPP
|
||||||
|
|
||||||
# XORG_MANPAGE_SECTIONS()
|
# XORG_MANPAGE_SECTIONS()
|
||||||
@ -10448,9 +10412,10 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
|
|||||||
]) # XORG_WITH_ASCIIDOC
|
]) # XORG_WITH_ASCIIDOC
|
||||||
|
|
||||||
# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
|
# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
|
||||||
# --------------------------------
|
# -------------------------------------------
|
||||||
# Minimum version: 1.5.0
|
# Minimum version: 1.5.0
|
||||||
# Minimum version for optional DEFAULT argument: 1.11.0
|
# Minimum version for optional DEFAULT argument: 1.11.0
|
||||||
|
# Minimum version for optional DOT checking: 1.18.0
|
||||||
#
|
#
|
||||||
# Documentation tools are not always available on all platforms and sometimes
|
# Documentation tools are not always available on all platforms and sometimes
|
||||||
# not at the appropriate level. This macro enables a module to test for the
|
# not at the appropriate level. This macro enables a module to test for the
|
||||||
@ -10470,6 +10435,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
|
|||||||
#
|
#
|
||||||
AC_DEFUN([XORG_WITH_DOXYGEN],[
|
AC_DEFUN([XORG_WITH_DOXYGEN],[
|
||||||
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
|
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
|
||||||
|
AC_ARG_VAR([DOT], [Path to the dot graphics utility])
|
||||||
m4_define([_defopt], m4_default([$2], [auto]))
|
m4_define([_defopt], m4_default([$2], [auto]))
|
||||||
AC_ARG_WITH(doxygen,
|
AC_ARG_WITH(doxygen,
|
||||||
AS_HELP_STRING([--with-doxygen],
|
AS_HELP_STRING([--with-doxygen],
|
||||||
@ -10513,6 +10479,20 @@ m4_ifval([$1],
|
|||||||
AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
|
AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
|
||||||
fi])
|
fi])
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
|
dnl Check for DOT if we have doxygen. The caller decides if it is mandatory
|
||||||
|
dnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
|
||||||
|
dnl HAVE_DOT = @HAVE_DOT@
|
||||||
|
HAVE_DOT=no
|
||||||
|
if test "x$have_doxygen" = "xyes"; then
|
||||||
|
AC_PATH_PROG([DOT], [dot])
|
||||||
|
if test "x$DOT" != "x"; then
|
||||||
|
HAVE_DOT=yes
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST([HAVE_DOT])
|
||||||
|
AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
|
||||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
|
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
|
||||||
]) # XORG_WITH_DOXYGEN
|
]) # XORG_WITH_DOXYGEN
|
||||||
|
|
||||||
@ -10695,6 +10675,29 @@ fi])
|
|||||||
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
|
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
|
||||||
]) # XORG_WITH_FOP
|
]) # XORG_WITH_FOP
|
||||||
|
|
||||||
|
# XORG_WITH_M4([MIN-VERSION])
|
||||||
|
# ---------------------------
|
||||||
|
# Minimum version: 1.19.0
|
||||||
|
#
|
||||||
|
# This macro attempts to locate an m4 macro processor which supports
|
||||||
|
# -I option and is only useful for modules relying on M4 in order to
|
||||||
|
# expand macros in source code files.
|
||||||
|
#
|
||||||
|
# Interface to module:
|
||||||
|
# M4: returns the path of the m4 program found
|
||||||
|
# returns the path set by the user in the environment
|
||||||
|
#
|
||||||
|
AC_DEFUN([XORG_WITH_M4], [
|
||||||
|
AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
|
||||||
|
[AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
|
||||||
|
[[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
|
||||||
|
ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
|
||||||
|
[AC_MSG_ERROR([could not find m4 that supports -I option])],
|
||||||
|
[$PATH:/usr/gnu/bin])])
|
||||||
|
|
||||||
|
AC_SUBST([M4], [$ac_cv_path_M4])
|
||||||
|
]) # XORG_WITH_M4
|
||||||
|
|
||||||
# XORG_WITH_PS2PDF([DEFAULT])
|
# XORG_WITH_PS2PDF([DEFAULT])
|
||||||
# ----------------
|
# ----------------
|
||||||
# Minimum version: 1.6.0
|
# Minimum version: 1.6.0
|
||||||
@ -11149,7 +11152,8 @@ AC_ARG_ENABLE(malloc0returnsnull,
|
|||||||
|
|
||||||
AC_MSG_CHECKING([whether malloc(0) returns NULL])
|
AC_MSG_CHECKING([whether malloc(0) returns NULL])
|
||||||
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
|
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
|
||||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([
|
AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
|
||||||
|
[AC_RUN_IFELSE([AC_LANG_PROGRAM([
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
],[
|
],[
|
||||||
char *m0, *r0, *c0, *p;
|
char *m0, *r0, *c0, *p;
|
||||||
@ -11159,9 +11163,9 @@ if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
|
|||||||
c0 = calloc(0,10);
|
c0 = calloc(0,10);
|
||||||
exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
|
exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
|
||||||
])],
|
])],
|
||||||
[MALLOC_ZERO_RETURNS_NULL=yes],
|
[xorg_cv_malloc0_returns_null=yes],
|
||||||
[MALLOC_ZERO_RETURNS_NULL=no],
|
[xorg_cv_malloc0_returns_null=no])])
|
||||||
[MALLOC_ZERO_RETURNS_NULL=yes])
|
MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
|
AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
|
||||||
|
|
||||||
@ -11372,18 +11376,18 @@ fi
|
|||||||
found="no"
|
found="no"
|
||||||
m4_foreach([flag], m4_cdr($@), [
|
m4_foreach([flag], m4_cdr($@), [
|
||||||
if test $found = "no" ; then
|
if test $found = "no" ; then
|
||||||
if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
|
if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
|
||||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
|
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
|
if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
|
||||||
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
|
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
|
PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
|
||||||
|
|
||||||
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
|
dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
|
||||||
AC_MSG_CHECKING([if ]COMPILER[ supports]flag[])
|
AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
|
||||||
cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
|
cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
|
||||||
AC_CACHE_VAL($cacheid,
|
AC_CACHE_VAL($cacheid,
|
||||||
[AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
|
||||||
@ -11450,7 +11454,7 @@ AC_LANG_CASE(
|
|||||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
|
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
|
||||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
|
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
|
||||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
|
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
|
||||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
|
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
|
||||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
|
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@ -11459,16 +11463,17 @@ AC_LANG_CASE(
|
|||||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
|
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
|
||||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
|
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
|
||||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
|
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
|
||||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
|
|
||||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
|
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
|
||||||
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
|
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
|
||||||
|
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
|
||||||
|
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
|
||||||
|
|
||||||
# These are currently disabled because they are noisy. They will be enabled
|
# These are currently disabled because they are noisy. They will be enabled
|
||||||
# in the future once the codebase is sufficiently modernized to silence
|
# in the future once the codebase is sufficiently modernized to silence
|
||||||
# them. For now, I don't want them to drown out the other warnings.
|
# them. For now, I don't want them to drown out the other warnings.
|
||||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
|
|
||||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
|
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
|
||||||
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
|
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
|
||||||
|
# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
|
||||||
|
|
||||||
# Turn some warnings into errors, so we don't accidently get successful builds
|
# Turn some warnings into errors, so we don't accidently get successful builds
|
||||||
# when there are problems that should be fixed.
|
# when there are problems that should be fixed.
|
||||||
@ -11642,7 +11647,7 @@ dnl
|
|||||||
# XORG_RELEASE_VERSION
|
# XORG_RELEASE_VERSION
|
||||||
# --------------------
|
# --------------------
|
||||||
# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
|
# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
|
||||||
|
|
||||||
AC_DEFUN([XORG_RELEASE_VERSION],[
|
AC_DEFUN([XORG_RELEASE_VERSION],[
|
||||||
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
|
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
|
||||||
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
|
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
|
||||||
@ -11710,12 +11715,12 @@ AC_DEFUN([XTRANS_TCP_FLAGS],[
|
|||||||
AC_SEARCH_LIBS(socket, [socket])
|
AC_SEARCH_LIBS(socket, [socket])
|
||||||
AC_SEARCH_LIBS(gethostbyname, [nsl])
|
AC_SEARCH_LIBS(gethostbyname, [nsl])
|
||||||
if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
|
if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
|
||||||
AC_HAVE_LIBRARY([ws2_32])
|
AC_CHECK_LIB([ws2_32],[main])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Needs to come after above checks for libsocket & libnsl for SVR4 systems
|
# Needs to come after above checks for libsocket & libnsl for SVR4 systems
|
||||||
AC_ARG_ENABLE(ipv6,
|
AC_ARG_ENABLE(ipv6,
|
||||||
AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
|
AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
|
||||||
[IPV6CONN=$enableval],
|
[IPV6CONN=$enableval],
|
||||||
[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
|
[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
|
||||||
AC_MSG_CHECKING([if IPv6 support should be built])
|
AC_MSG_CHECKING([if IPv6 support should be built])
|
||||||
@ -11738,6 +11743,41 @@ AC_DEFUN([XTRANS_TCP_FLAGS],[
|
|||||||
AC_INCLUDES_DEFAULT
|
AC_INCLUDES_DEFAULT
|
||||||
#include <sys/socket.h>])
|
#include <sys/socket.h>])
|
||||||
|
|
||||||
|
# XPG4v2/UNIX95 added msg_control - check to see if we need to define
|
||||||
|
# _XOPEN_SOURCE to get it (such as on Solaris)
|
||||||
|
AC_CHECK_MEMBER([struct msghdr.msg_control], [], [],
|
||||||
|
[
|
||||||
|
AC_INCLUDES_DEFAULT
|
||||||
|
#include <sys/socket.h>
|
||||||
|
])
|
||||||
|
# First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03
|
||||||
|
if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
|
||||||
|
unset ac_cv_member_struct_msghdr_msg_control
|
||||||
|
AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600])
|
||||||
|
AC_CHECK_MEMBER([struct msghdr.msg_control],
|
||||||
|
[AC_DEFINE([_XOPEN_SOURCE], [600],
|
||||||
|
[Defined if needed to expose struct msghdr.msg_control])
|
||||||
|
], [], [
|
||||||
|
#define _XOPEN_SOURCE 600
|
||||||
|
AC_INCLUDES_DEFAULT
|
||||||
|
#include <sys/socket.h>
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
# If that didn't work, fall back to XPG5/UNIX98 with C89
|
||||||
|
if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
|
||||||
|
unset ac_cv_member_struct_msghdr_msg_control
|
||||||
|
AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500])
|
||||||
|
AC_CHECK_MEMBER([struct msghdr.msg_control],
|
||||||
|
[AC_DEFINE([_XOPEN_SOURCE], [500],
|
||||||
|
[Defined if needed to expose struct msghdr.msg_control])
|
||||||
|
], [], [
|
||||||
|
#define _XOPEN_SOURCE 500
|
||||||
|
AC_INCLUDES_DEFAULT
|
||||||
|
#include <sys/socket.h>
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
]) # XTRANS_TCP_FLAGS
|
]) # XTRANS_TCP_FLAGS
|
||||||
|
|
||||||
# XTRANS_CONNECTION_FLAGS()
|
# XTRANS_CONNECTION_FLAGS()
|
||||||
@ -11746,13 +11786,12 @@ AC_INCLUDES_DEFAULT
|
|||||||
# that use Xtrans functions
|
# that use Xtrans functions
|
||||||
AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
|
AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
|
||||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
AC_REQUIRE([AC_TYPE_SIGNAL])
|
|
||||||
[case $host_os in
|
[case $host_os in
|
||||||
mingw*) unixdef="no" ;;
|
mingw*) unixdef="no" ;;
|
||||||
*) unixdef="yes" ;;
|
*) unixdef="yes" ;;
|
||||||
esac]
|
esac]
|
||||||
AC_ARG_ENABLE(unix-transport,
|
AC_ARG_ENABLE(unix-transport,
|
||||||
AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
|
AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
|
||||||
[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
|
[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
|
||||||
AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
|
AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
|
||||||
if test "$UNIXCONN" = "yes"; then
|
if test "$UNIXCONN" = "yes"; then
|
||||||
@ -11760,7 +11799,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
|
|||||||
fi
|
fi
|
||||||
AC_MSG_RESULT($UNIXCONN)
|
AC_MSG_RESULT($UNIXCONN)
|
||||||
AC_ARG_ENABLE(tcp-transport,
|
AC_ARG_ENABLE(tcp-transport,
|
||||||
AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
|
AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
|
||||||
[TCPCONN=$enableval], [TCPCONN=yes])
|
[TCPCONN=$enableval], [TCPCONN=yes])
|
||||||
AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
|
AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
|
||||||
AC_MSG_RESULT($TCPCONN)
|
AC_MSG_RESULT($TCPCONN)
|
||||||
@ -11773,7 +11812,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
|
|||||||
*) localdef="no" ;;
|
*) localdef="no" ;;
|
||||||
esac]
|
esac]
|
||||||
AC_ARG_ENABLE(local-transport,
|
AC_ARG_ENABLE(local-transport,
|
||||||
AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
|
AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
|
||||||
[LOCALCONN=$enableval], [LOCALCONN=$localdef])
|
[LOCALCONN=$enableval], [LOCALCONN=$localdef])
|
||||||
AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
|
AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
|
||||||
AC_MSG_RESULT($LOCALCONN)
|
AC_MSG_RESULT($LOCALCONN)
|
||||||
@ -11791,7 +11830,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
|
|||||||
AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
|
AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
|
||||||
[AC_REQUIRE([XTRANS_TCP_FLAGS])
|
[AC_REQUIRE([XTRANS_TCP_FLAGS])
|
||||||
AC_ARG_ENABLE(secure-rpc,
|
AC_ARG_ENABLE(secure-rpc,
|
||||||
AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
|
AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
|
||||||
[SECURE_RPC=$enableval], [SECURE_RPC="try"])
|
[SECURE_RPC=$enableval], [SECURE_RPC="try"])
|
||||||
|
|
||||||
if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
|
if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
|
||||||
|
347
lib/libICE/compile
Normal file
347
lib/libICE/compile
Normal file
@ -0,0 +1,347 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
|
||||||
|
scriptversion=2012-10-14.11; # UTC
|
||||||
|
|
||||||
|
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||||
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
|
#
|
||||||
|
# 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 Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# As a special exception to the GNU General Public License, if you
|
||||||
|
# distribute this file as part of a program that contains a
|
||||||
|
# configuration script generated by Autoconf, you may include it under
|
||||||
|
# the same distribution terms that you use for the rest of that program.
|
||||||
|
|
||||||
|
# This file is maintained in Automake, please report
|
||||||
|
# bugs to <bug-automake@gnu.org> or send patches to
|
||||||
|
# <automake-patches@gnu.org>.
|
||||||
|
|
||||||
|
nl='
|
||||||
|
'
|
||||||
|
|
||||||
|
# We need space, tab and new line, in precisely that order. Quoting is
|
||||||
|
# there to prevent tools from complaining about whitespace usage.
|
||||||
|
IFS=" "" $nl"
|
||||||
|
|
||||||
|
file_conv=
|
||||||
|
|
||||||
|
# func_file_conv build_file lazy
|
||||||
|
# Convert a $build file to $host form and store it in $file
|
||||||
|
# Currently only supports Windows hosts. If the determined conversion
|
||||||
|
# type is listed in (the comma separated) LAZY, no conversion will
|
||||||
|
# take place.
|
||||||
|
func_file_conv ()
|
||||||
|
{
|
||||||
|
file=$1
|
||||||
|
case $file in
|
||||||
|
/ | /[!/]*) # absolute file, and not a UNC file
|
||||||
|
if test -z "$file_conv"; then
|
||||||
|
# lazily determine how to convert abs files
|
||||||
|
case `uname -s` in
|
||||||
|
MINGW*)
|
||||||
|
file_conv=mingw
|
||||||
|
;;
|
||||||
|
CYGWIN*)
|
||||||
|
file_conv=cygwin
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
file_conv=wine
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
case $file_conv/,$2, in
|
||||||
|
*,$file_conv,*)
|
||||||
|
;;
|
||||||
|
mingw/*)
|
||||||
|
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||||
|
;;
|
||||||
|
cygwin/*)
|
||||||
|
file=`cygpath -m "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
wine/*)
|
||||||
|
file=`winepath -w "$file" || echo "$file"`
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashL linkdir
|
||||||
|
# Make cl look for libraries in LINKDIR
|
||||||
|
func_cl_dashL ()
|
||||||
|
{
|
||||||
|
func_file_conv "$1"
|
||||||
|
if test -z "$lib_path"; then
|
||||||
|
lib_path=$file
|
||||||
|
else
|
||||||
|
lib_path="$lib_path;$file"
|
||||||
|
fi
|
||||||
|
linker_opts="$linker_opts -LIBPATH:$file"
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_dashl library
|
||||||
|
# Do a library search-path lookup for cl
|
||||||
|
func_cl_dashl ()
|
||||||
|
{
|
||||||
|
lib=$1
|
||||||
|
found=no
|
||||||
|
save_IFS=$IFS
|
||||||
|
IFS=';'
|
||||||
|
for dir in $lib_path $LIB
|
||||||
|
do
|
||||||
|
IFS=$save_IFS
|
||||||
|
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.dll.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/$lib.lib"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/$lib.lib
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
if test -f "$dir/lib$lib.a"; then
|
||||||
|
found=yes
|
||||||
|
lib=$dir/lib$lib.a
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS=$save_IFS
|
||||||
|
|
||||||
|
if test "$found" != yes; then
|
||||||
|
lib=$lib.lib
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# func_cl_wrapper cl arg...
|
||||||
|
# Adjust compile command to suit cl
|
||||||
|
func_cl_wrapper ()
|
||||||
|
{
|
||||||
|
# Assume a capable shell
|
||||||
|
lib_path=
|
||||||
|
shared=:
|
||||||
|
linker_opts=
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.[oO][bB][jJ])
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fo"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
func_file_conv "$2"
|
||||||
|
set x "$@" -Fe"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
-I)
|
||||||
|
eat=1
|
||||||
|
func_file_conv "$2" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-I*)
|
||||||
|
func_file_conv "${1#-I}" mingw
|
||||||
|
set x "$@" -I"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashl "$2"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-l*)
|
||||||
|
func_cl_dashl "${1#-l}"
|
||||||
|
set x "$@" "$lib"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-L)
|
||||||
|
eat=1
|
||||||
|
func_cl_dashL "$2"
|
||||||
|
;;
|
||||||
|
-L*)
|
||||||
|
func_cl_dashL "${1#-L}"
|
||||||
|
;;
|
||||||
|
-static)
|
||||||
|
shared=false
|
||||||
|
;;
|
||||||
|
-Wl,*)
|
||||||
|
arg=${1#-Wl,}
|
||||||
|
save_ifs="$IFS"; IFS=','
|
||||||
|
for flag in $arg; do
|
||||||
|
IFS="$save_ifs"
|
||||||
|
linker_opts="$linker_opts $flag"
|
||||||
|
done
|
||||||
|
IFS="$save_ifs"
|
||||||
|
;;
|
||||||
|
-Xlinker)
|
||||||
|
eat=1
|
||||||
|
linker_opts="$linker_opts $2"
|
||||||
|
;;
|
||||||
|
-*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||||
|
func_file_conv "$1"
|
||||||
|
set x "$@" -Tp"$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||||
|
func_file_conv "$1" mingw
|
||||||
|
set x "$@" "$file"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
if test -n "$linker_opts"; then
|
||||||
|
linker_opts="-link$linker_opts"
|
||||||
|
fi
|
||||||
|
exec "$@" $linker_opts
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
eat=
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
'')
|
||||||
|
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||||
|
exit 1;
|
||||||
|
;;
|
||||||
|
-h | --h*)
|
||||||
|
cat <<\EOF
|
||||||
|
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||||
|
|
||||||
|
Wrapper for compilers which do not understand '-c -o'.
|
||||||
|
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||||
|
arguments, and rename the output as expected.
|
||||||
|
|
||||||
|
If you are trying to build a whole package this is not the
|
||||||
|
right script to run: please start by reading the file 'INSTALL'.
|
||||||
|
|
||||||
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
EOF
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
-v | --v*)
|
||||||
|
echo "compile $scriptversion"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||||
|
func_cl_wrapper "$@" # Doesn't return...
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
ofile=
|
||||||
|
cfile=
|
||||||
|
|
||||||
|
for arg
|
||||||
|
do
|
||||||
|
if test -n "$eat"; then
|
||||||
|
eat=
|
||||||
|
else
|
||||||
|
case $1 in
|
||||||
|
-o)
|
||||||
|
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||||
|
# So we strip '-o arg' only if arg is an object.
|
||||||
|
eat=1
|
||||||
|
case $2 in
|
||||||
|
*.o | *.obj)
|
||||||
|
ofile=$2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" -o "$2"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
*.c)
|
||||||
|
cfile=$1
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
set x "$@" "$1"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if test -z "$ofile" || test -z "$cfile"; then
|
||||||
|
# If no '-o' option was seen then we might have been invoked from a
|
||||||
|
# pattern rule where we don't need one. That is ok -- this is a
|
||||||
|
# normal compilation that the losing compiler can handle. If no
|
||||||
|
# '.c' file was seen then we are probably linking. That is also
|
||||||
|
# ok.
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Name of file we expect compiler to create.
|
||||||
|
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||||
|
|
||||||
|
# Create the lock directory.
|
||||||
|
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||||
|
# that we are using for the .o file. Also, base the name on the expected
|
||||||
|
# object file name, since that is what matters with a parallel build.
|
||||||
|
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||||
|
while true; do
|
||||||
|
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
# FIXME: race condition here if user kills between mkdir and trap.
|
||||||
|
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||||
|
|
||||||
|
# Run the compile.
|
||||||
|
"$@"
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if test -f "$cofile"; then
|
||||||
|
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||||
|
elif test -f "${cofile}bj"; then
|
||||||
|
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rmdir "$lockdir"
|
||||||
|
exit $ret
|
||||||
|
|
||||||
|
# Local Variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-indentation: 2
|
||||||
|
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||||
|
# time-stamp-start: "scriptversion="
|
||||||
|
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||||
|
# time-stamp-time-zone: "UTC"
|
||||||
|
# time-stamp-end: "; # UTC"
|
||||||
|
# End:
|
@ -15,6 +15,9 @@
|
|||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
#undef HAVE_INTTYPES_H
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `bsd' library (-lbsd). */
|
||||||
|
#undef HAVE_LIBBSD
|
||||||
|
|
||||||
/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
|
/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
|
||||||
#undef HAVE_LIBWS2_32
|
#undef HAVE_LIBWS2_32
|
||||||
|
|
||||||
@ -88,9 +91,6 @@
|
|||||||
/* Patch version of this package */
|
/* Patch version of this package */
|
||||||
#undef PACKAGE_VERSION_PATCHLEVEL
|
#undef PACKAGE_VERSION_PATCHLEVEL
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
|
||||||
#undef RETSIGTYPE
|
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
@ -134,3 +134,6 @@
|
|||||||
|
|
||||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||||
#undef _POSIX_SOURCE
|
#undef _POSIX_SOURCE
|
||||||
|
|
||||||
|
/* Defined if needed to expose struct msghdr.msg_control */
|
||||||
|
#undef _XOPEN_SOURCE
|
||||||
|
865
lib/libICE/configure
vendored
865
lib/libICE/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
# Initialize Autoconf
|
# Initialize Autoconf
|
||||||
AC_PREREQ([2.60])
|
AC_PREREQ([2.60])
|
||||||
AC_INIT([libICE], [1.0.8],
|
AC_INIT([libICE], [1.0.9],
|
||||||
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libICE])
|
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libICE])
|
||||||
AC_CONFIG_SRCDIR([Makefile.am])
|
AC_CONFIG_SRCDIR([Makefile.am])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
@ -13,7 +13,6 @@ AC_USE_SYSTEM_EXTENSIONS
|
|||||||
|
|
||||||
# Initialize Automake
|
# Initialize Automake
|
||||||
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
||||||
AM_MAINTAINER_MODE
|
|
||||||
|
|
||||||
# Initialize libtool
|
# Initialize libtool
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
@ -38,6 +37,7 @@ XTRANS_CONNECTION_FLAGS
|
|||||||
AC_DEFINE(ICE_t, 1, [Xtrans transport type])
|
AC_DEFINE(ICE_t, 1, [Xtrans transport type])
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
|
AC_CHECK_LIB([bsd], [arc4random_buf])
|
||||||
AC_CHECK_FUNCS([asprintf arc4random_buf])
|
AC_CHECK_FUNCS([asprintf arc4random_buf])
|
||||||
|
|
||||||
# Allow checking code with lint, sparse, etc.
|
# Allow checking code with lint, sparse, etc.
|
||||||
|
@ -192,7 +192,6 @@ LINT_FLAGS = @LINT_FLAGS@
|
|||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
MAINT = @MAINT@
|
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
MAN_SUBSTS = @MAN_SUBSTS@
|
MAN_SUBSTS = @MAN_SUBSTS@
|
||||||
@ -347,7 +346,7 @@ top_srcdir = @top_srcdir@
|
|||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/docbook.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/docbook.am $(am__configure_deps)
|
||||||
@for dep in $?; do \
|
@for dep in $?; do \
|
||||||
case '$(am__configure_deps)' in \
|
case '$(am__configure_deps)' in \
|
||||||
*$$dep*) \
|
*$$dep*) \
|
||||||
@ -373,9 +372,9 @@ $(top_srcdir)/docbook.am:
|
|||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
@ -161,10 +161,10 @@ extern IcePaAuthStatus _IcePaMagicCookie1Proc (
|
|||||||
IceGetHeader (_iceConn, _offendingMajorOpcode, ICE_Error, \
|
IceGetHeader (_iceConn, _offendingMajorOpcode, ICE_Error, \
|
||||||
SIZEOF (iceErrorMsg), iceErrorMsg, _pMsg); \
|
SIZEOF (iceErrorMsg), iceErrorMsg, _pMsg); \
|
||||||
_pMsg->length += (_dataLength); \
|
_pMsg->length += (_dataLength); \
|
||||||
_pMsg->offendingMinorOpcode = _offendingMinorOpcode; \
|
_pMsg->offendingMinorOpcode = (CARD8) _offendingMinorOpcode; \
|
||||||
_pMsg->severity = _severity; \
|
_pMsg->severity = (CARD8) _severity; \
|
||||||
_pMsg->offendingSequenceNum = _offendingSequenceNum; \
|
_pMsg->offendingSequenceNum = (CARD32) _offendingSequenceNum; \
|
||||||
_pMsg->errorClass = _errorClass; \
|
_pMsg->errorClass = (CARD16) _errorClass; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -186,20 +186,12 @@ extern IcePaAuthStatus _IcePaMagicCookie1Proc (
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WORD64
|
|
||||||
|
|
||||||
#define IceWriteData16(_iceConn, _bytes, _data) \
|
#define IceWriteData16(_iceConn, _bytes, _data) \
|
||||||
IceWriteData (_iceConn, _bytes, (char *) _data)
|
IceWriteData (_iceConn, _bytes, (char *) _data)
|
||||||
|
|
||||||
#define IceWriteData32(_iceConn, _bytes, _data) \
|
#define IceWriteData32(_iceConn, _bytes, _data) \
|
||||||
IceWriteData (_iceConn, _bytes, (char *) _data)
|
IceWriteData (_iceConn, _bytes, (char *) _data)
|
||||||
|
|
||||||
#else /* WORD64 */
|
|
||||||
|
|
||||||
/* IceWriteData16 and IceWriteData32 defined in misc.c for WORD64 */
|
|
||||||
|
|
||||||
#endif /* WORD64 */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The IceSendData macro bypasses copying the data to the
|
* The IceSendData macro bypasses copying the data to the
|
||||||
@ -252,7 +244,7 @@ extern IcePaAuthStatus _IcePaMagicCookie1Proc (
|
|||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
_pData = (char *) malloc ((unsigned) _bytes); \
|
_pData = malloc (_bytes); \
|
||||||
if (_pData) \
|
if (_pData) \
|
||||||
_IceRead (_iceConn, _bytes, _pData); \
|
_IceRead (_iceConn, _bytes, _pData); \
|
||||||
else \
|
else \
|
||||||
@ -263,7 +255,7 @@ extern IcePaAuthStatus _IcePaMagicCookie1Proc (
|
|||||||
#define IceDisposeCompleteMessage(_iceConn, _pData) \
|
#define IceDisposeCompleteMessage(_iceConn, _pData) \
|
||||||
if ((char *) _pData < _iceConn->inbuf || \
|
if ((char *) _pData < _iceConn->inbuf || \
|
||||||
(char *) _pData >= _iceConn->inbufmax) \
|
(char *) _pData >= _iceConn->inbufmax) \
|
||||||
free ((char *) _pData);
|
free (_pData);
|
||||||
|
|
||||||
|
|
||||||
#define IceReadSimpleMessage(_iceConn, _msgType, _pMsg) \
|
#define IceReadSimpleMessage(_iceConn, _msgType, _pMsg) \
|
||||||
@ -281,8 +273,6 @@ extern IcePaAuthStatus _IcePaMagicCookie1Proc (
|
|||||||
#define IceReadData(_iceConn, _bytes, _pData) \
|
#define IceReadData(_iceConn, _bytes, _pData) \
|
||||||
_IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
|
_IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
|
||||||
|
|
||||||
#ifndef WORD64
|
|
||||||
|
|
||||||
#define IceReadData16(_iceConn, _swap, _bytes, _pData) \
|
#define IceReadData16(_iceConn, _swap, _bytes, _pData) \
|
||||||
{ \
|
{ \
|
||||||
_IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
|
_IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
|
||||||
@ -293,12 +283,6 @@ extern IcePaAuthStatus _IcePaMagicCookie1Proc (
|
|||||||
_IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
|
_IceRead (_iceConn, (unsigned long) (_bytes), (char *) _pData); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* WORD64 */
|
|
||||||
|
|
||||||
/* IceReadData16 and IceReadData32 defined in misc.c for WORD64 */
|
|
||||||
|
|
||||||
#endif /* WORD64 */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read pad bytes (for 32 or 64 bit alignment).
|
* Read pad bytes (for 32 or 64 bit alignment).
|
||||||
|
@ -81,14 +81,14 @@ extern char *IceAuthFileName (
|
|||||||
);
|
);
|
||||||
|
|
||||||
extern int IceLockAuthFile (
|
extern int IceLockAuthFile (
|
||||||
char * /* file_name */,
|
const char * /* file_name */,
|
||||||
int /* retries */,
|
int /* retries */,
|
||||||
int /* timeout */,
|
int /* timeout */,
|
||||||
long /* dead */
|
long /* dead */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern void IceUnlockAuthFile (
|
extern void IceUnlockAuthFile (
|
||||||
char * /* file_name */
|
const char * /* file_name */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern IceAuthFileEntry *IceReadAuthFileEntry (
|
extern IceAuthFileEntry *IceReadAuthFileEntry (
|
||||||
|
@ -192,7 +192,6 @@ LINT_FLAGS = @LINT_FLAGS@
|
|||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
MAINT = @MAINT@
|
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
MAN_SUBSTS = @MAN_SUBSTS@
|
MAN_SUBSTS = @MAN_SUBSTS@
|
||||||
@ -347,7 +346,7 @@ top_srcdir = @top_srcdir@
|
|||||||
all: all-am
|
all: all-am
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/docbook.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/docbook.am $(am__configure_deps)
|
||||||
@for dep in $?; do \
|
@for dep in $?; do \
|
||||||
case '$(am__configure_deps)' in \
|
case '$(am__configure_deps)' in \
|
||||||
*$$dep*) \
|
*$$dep*) \
|
||||||
@ -373,9 +372,9 @@ $(top_srcdir)/docbook.am:
|
|||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ Author: Ralph Mor, X Consortium
|
|||||||
|
|
||||||
#define PAD64(_bytes) ((8 - ((unsigned int) (_bytes) % 8)) % 8)
|
#define PAD64(_bytes) ((8 - ((unsigned int) (_bytes) % 8)) % 8)
|
||||||
|
|
||||||
#define PADDED_BYTES64(_bytes) (_bytes + PAD64 (_bytes))
|
#define PADDED_BYTES64(_bytes) ((unsigned int) _bytes + PAD64 (_bytes))
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -67,7 +67,7 @@ Author: Ralph Mor, X Consortium
|
|||||||
|
|
||||||
#define PAD32(_bytes) ((4 - ((unsigned int) (_bytes) % 4)) % 4)
|
#define PAD32(_bytes) ((4 - ((unsigned int) (_bytes) % 4)) % 4)
|
||||||
|
|
||||||
#define PADDED_BYTES32(_bytes) (_bytes + PAD32 (_bytes))
|
#define PADDED_BYTES32(_bytes) ((unsigned int) _bytes + PAD32 (_bytes))
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -155,8 +155,6 @@ typedef struct {
|
|||||||
_pBuf += 1; \
|
_pBuf += 1; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WORD64
|
|
||||||
|
|
||||||
#define STORE_CARD16(_pBuf, _val) \
|
#define STORE_CARD16(_pBuf, _val) \
|
||||||
{ \
|
{ \
|
||||||
*((CARD16 *) _pBuf) = _val; \
|
*((CARD16 *) _pBuf) = _val; \
|
||||||
@ -169,34 +167,10 @@ typedef struct {
|
|||||||
_pBuf += 4; \
|
_pBuf += 4; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* WORD64 */
|
|
||||||
|
|
||||||
#define STORE_CARD16(_pBuf, _val) \
|
|
||||||
{ \
|
|
||||||
struct { \
|
|
||||||
int value :16; \
|
|
||||||
int pad :16; \
|
|
||||||
} _d; \
|
|
||||||
_d.value = _val; \
|
|
||||||
memcpy (_pBuf, &_d, 2); \
|
|
||||||
_pBuf += 2; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define STORE_CARD32(_pBuf, _val) \
|
|
||||||
{ \
|
|
||||||
struct { \
|
|
||||||
int value :32; \
|
|
||||||
} _d; \
|
|
||||||
_d.value = _val; \
|
|
||||||
memcpy (_pBuf, &_d, 4); \
|
|
||||||
_pBuf += 4; \
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* WORD64 */
|
|
||||||
|
|
||||||
#define STORE_STRING(_pBuf, _string) \
|
#define STORE_STRING(_pBuf, _string) \
|
||||||
{ \
|
{ \
|
||||||
CARD16 _len = strlen (_string); \
|
CARD16 _len = (CARD16) strlen (_string); \
|
||||||
STORE_CARD16 (_pBuf, _len); \
|
STORE_CARD16 (_pBuf, _len); \
|
||||||
memcpy (_pBuf, _string, _len); \
|
memcpy (_pBuf, _string, _len); \
|
||||||
_pBuf += _len; \
|
_pBuf += _len; \
|
||||||
@ -215,8 +189,6 @@ typedef struct {
|
|||||||
_pBuf += 1; \
|
_pBuf += 1; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WORD64
|
|
||||||
|
|
||||||
#define EXTRACT_CARD16(_pBuf, _swap, _val) \
|
#define EXTRACT_CARD16(_pBuf, _swap, _val) \
|
||||||
{ \
|
{ \
|
||||||
_val = *((CARD16 *) _pBuf); \
|
_val = *((CARD16 *) _pBuf); \
|
||||||
@ -233,39 +205,12 @@ typedef struct {
|
|||||||
_val = lswapl (_val); \
|
_val = lswapl (_val); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* WORD64 */
|
|
||||||
|
|
||||||
#define EXTRACT_CARD16(_pBuf, _swap, _val) \
|
|
||||||
{ \
|
|
||||||
_val = *(_pBuf + 0) & 0xff; /* 0xff incase _pBuf is signed */ \
|
|
||||||
_val <<= 8; \
|
|
||||||
_val |= *(_pBuf + 1) & 0xff;\
|
|
||||||
_pBuf += 2; \
|
|
||||||
if (_swap) \
|
|
||||||
_val = lswaps (_val); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#define EXTRACT_CARD32(_pBuf, _swap, _val) \
|
|
||||||
{ \
|
|
||||||
_val = *(_pBuf + 0) & 0xff; /* 0xff incase _pBuf is signed */ \
|
|
||||||
_val <<= 8; \
|
|
||||||
_val |= *(_pBuf + 1) & 0xff;\
|
|
||||||
_val <<= 8; \
|
|
||||||
_val |= *(_pBuf + 2) & 0xff;\
|
|
||||||
_val <<= 8; \
|
|
||||||
_val |= *(_pBuf + 3) & 0xff;\
|
|
||||||
_pBuf += 4; \
|
|
||||||
if (_swap) \
|
|
||||||
_val = lswapl (_val); \
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* WORD64 */
|
|
||||||
|
|
||||||
#define EXTRACT_STRING(_pBuf, _swap, _string) \
|
#define EXTRACT_STRING(_pBuf, _swap, _string) \
|
||||||
{ \
|
{ \
|
||||||
CARD16 _len; \
|
CARD16 _len; \
|
||||||
EXTRACT_CARD16 (_pBuf, _swap, _len); \
|
EXTRACT_CARD16 (_pBuf, _swap, _len); \
|
||||||
_string = (char *) malloc (_len + 1); \
|
_string = malloc (_len + 1); \
|
||||||
memcpy (_string, _pBuf, _len); \
|
memcpy (_string, _pBuf, _len); \
|
||||||
_pBuf += _len; \
|
_pBuf += _len; \
|
||||||
_string[_len] = '\0'; \
|
_string[_len] = '\0'; \
|
||||||
|
@ -209,7 +209,6 @@ LINT_FLAGS = @LINT_FLAGS@
|
|||||||
LIPO = @LIPO@
|
LIPO = @LIPO@
|
||||||
LN_S = @LN_S@
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
MAINT = @MAINT@
|
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||||
MAN_SUBSTS = @MAN_SUBSTS@
|
MAN_SUBSTS = @MAN_SUBSTS@
|
||||||
@ -346,7 +345,7 @@ all: all-am
|
|||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .lo .o .obj
|
.SUFFIXES: .c .lo .o .obj
|
||||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
@for dep in $?; do \
|
@for dep in $?; do \
|
||||||
case '$(am__configure_deps)' in \
|
case '$(am__configure_deps)' in \
|
||||||
*$$dep*) \
|
*$$dep*) \
|
||||||
@ -371,9 +370,9 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
|||||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
$(am__aclocal_m4_deps):
|
$(am__aclocal_m4_deps):
|
||||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||||
|
@ -70,7 +70,7 @@ IceAcceptConnection (
|
|||||||
* Create an ICE object for this connection.
|
* Create an ICE object for this connection.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((iceConn = (IceConn) malloc (sizeof (struct _IceConn))) == NULL)
|
if ((iceConn = malloc (sizeof (struct _IceConn))) == NULL)
|
||||||
{
|
{
|
||||||
_IceTransClose (newconn);
|
_IceTransClose (newconn);
|
||||||
*statusRet = IceAcceptBadMalloc;
|
*statusRet = IceAcceptBadMalloc;
|
||||||
@ -95,7 +95,7 @@ IceAcceptConnection (
|
|||||||
if (iceConn->connection_string == NULL)
|
if (iceConn->connection_string == NULL)
|
||||||
{
|
{
|
||||||
_IceTransClose (newconn);
|
_IceTransClose (newconn);
|
||||||
free ((char *) iceConn);
|
free (iceConn);
|
||||||
*statusRet = IceAcceptBadMalloc;
|
*statusRet = IceAcceptBadMalloc;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
@ -103,29 +103,29 @@ IceAcceptConnection (
|
|||||||
iceConn->vendor = NULL;
|
iceConn->vendor = NULL;
|
||||||
iceConn->release = NULL;
|
iceConn->release = NULL;
|
||||||
|
|
||||||
if ((iceConn->inbuf = iceConn->inbufptr =
|
if ((iceConn->inbuf = iceConn->inbufptr = malloc (ICE_INBUFSIZE)) != NULL)
|
||||||
(char *) malloc (ICE_INBUFSIZE)) != NULL)
|
|
||||||
{
|
{
|
||||||
iceConn->inbufmax = iceConn->inbuf + ICE_INBUFSIZE;
|
iceConn->inbufmax = iceConn->inbuf + ICE_INBUFSIZE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_IceTransClose (newconn);
|
_IceTransClose (newconn);
|
||||||
free ((char *) iceConn);
|
free (iceConn->connection_string);
|
||||||
|
free (iceConn);
|
||||||
*statusRet = IceAcceptBadMalloc;
|
*statusRet = IceAcceptBadMalloc;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((iceConn->outbuf = iceConn->outbufptr =
|
if ((iceConn->outbuf = iceConn->outbufptr = malloc (ICE_OUTBUFSIZE)) != NULL)
|
||||||
(char *) malloc (ICE_OUTBUFSIZE)) != NULL)
|
|
||||||
{
|
{
|
||||||
iceConn->outbufmax = iceConn->outbuf + ICE_OUTBUFSIZE;
|
iceConn->outbufmax = iceConn->outbuf + ICE_OUTBUFSIZE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_IceTransClose (newconn);
|
_IceTransClose (newconn);
|
||||||
|
free (iceConn->connection_string);
|
||||||
free (iceConn->inbuf);
|
free (iceConn->inbuf);
|
||||||
free ((char *) iceConn);
|
free (iceConn);
|
||||||
*statusRet = IceAcceptBadMalloc;
|
*statusRet = IceAcceptBadMalloc;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
@ -35,13 +35,10 @@ Author: Ralph Mor, X Consortium
|
|||||||
#include <X11/Xos.h>
|
#include <X11/Xos.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#define Time_t time_t
|
#define Time_t time_t
|
||||||
#ifdef __UNIXOS2__
|
|
||||||
extern char* getenv(const char*);
|
|
||||||
#define link rename
|
|
||||||
#endif
|
|
||||||
#ifndef X_NOT_POSIX
|
#ifndef X_NOT_POSIX
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else
|
#else
|
||||||
@ -56,8 +53,8 @@ static Status read_short (FILE *file, unsigned short *shortp);
|
|||||||
static Status read_string (FILE *file, char **stringp);
|
static Status read_string (FILE *file, char **stringp);
|
||||||
static Status read_counted_string (FILE *file, unsigned short *countp, char **stringp);
|
static Status read_counted_string (FILE *file, unsigned short *countp, char **stringp);
|
||||||
static Status write_short (FILE *file, unsigned short s);
|
static Status write_short (FILE *file, unsigned short s);
|
||||||
static Status write_string (FILE *file, char *string);
|
static Status write_string (FILE *file, const char *string);
|
||||||
static Status write_counted_string (FILE *file, unsigned short count, char *string);
|
static Status write_counted_string (FILE *file, unsigned short count, const char *string);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -73,9 +70,9 @@ IceAuthFileName (void)
|
|||||||
static char slashDotICEauthority[] = "/.ICEauthority";
|
static char slashDotICEauthority[] = "/.ICEauthority";
|
||||||
char *name;
|
char *name;
|
||||||
static char *buf;
|
static char *buf;
|
||||||
static int bsize;
|
static size_t bsize;
|
||||||
int size;
|
size_t size;
|
||||||
#if defined(WIN32) || defined(__UNIXOS2__)
|
#ifdef WIN32
|
||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
#define PATH_MAX 512
|
#define PATH_MAX 512
|
||||||
#endif
|
#endif
|
||||||
@ -102,15 +99,10 @@ IceAuthFileName (void)
|
|||||||
len2 = strlen (ptr2);
|
len2 = strlen (ptr2);
|
||||||
}
|
}
|
||||||
if ((len1 + len2 + 1) < PATH_MAX) {
|
if ((len1 + len2 + 1) < PATH_MAX) {
|
||||||
sprintf (dir, "%s%s", ptr1, (ptr2) ? ptr2 : "");
|
snprintf (dir, sizeof(dir), "%s%s", ptr1, (ptr2) ? ptr2 : "");
|
||||||
name = dir;
|
name = dir;
|
||||||
}
|
}
|
||||||
if (!name)
|
if (!name)
|
||||||
#endif
|
|
||||||
#ifdef __UNIXOS2__
|
|
||||||
strcpy (dir,"c:");
|
|
||||||
name = dir;
|
|
||||||
if (!name)
|
|
||||||
#endif
|
#endif
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
@ -121,14 +113,14 @@ IceAuthFileName (void)
|
|||||||
{
|
{
|
||||||
if (buf)
|
if (buf)
|
||||||
free (buf);
|
free (buf);
|
||||||
buf = malloc ((unsigned) size);
|
buf = malloc (size);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
bsize = size;
|
bsize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy (buf, name);
|
snprintf (buf, bsize, "%s%s", name,
|
||||||
strcat (buf, slashDotICEauthority + (name[1] == '\0' ? 1 : 0));
|
slashDotICEauthority + (name[1] == '\0' ? 1 : 0));
|
||||||
|
|
||||||
return (buf);
|
return (buf);
|
||||||
}
|
}
|
||||||
@ -137,7 +129,7 @@ IceAuthFileName (void)
|
|||||||
|
|
||||||
int
|
int
|
||||||
IceLockAuthFile (
|
IceLockAuthFile (
|
||||||
char *file_name,
|
const char *file_name,
|
||||||
int retries,
|
int retries,
|
||||||
int timeout,
|
int timeout,
|
||||||
long dead
|
long dead
|
||||||
@ -151,10 +143,8 @@ IceLockAuthFile (
|
|||||||
if ((int) strlen (file_name) > 1022)
|
if ((int) strlen (file_name) > 1022)
|
||||||
return (IceAuthLockError);
|
return (IceAuthLockError);
|
||||||
|
|
||||||
strcpy (creat_name, file_name);
|
snprintf (creat_name, sizeof(creat_name), "%s-c", file_name);
|
||||||
strcat (creat_name, "-c");
|
snprintf (link_name, sizeof(link_name), "%s-l", file_name);
|
||||||
strcpy (link_name, file_name);
|
|
||||||
strcat (link_name, "-l");
|
|
||||||
|
|
||||||
if (stat (creat_name, &statb) != -1)
|
if (stat (creat_name, &statb) != -1)
|
||||||
{
|
{
|
||||||
@ -213,7 +203,7 @@ IceLockAuthFile (
|
|||||||
|
|
||||||
void
|
void
|
||||||
IceUnlockAuthFile (
|
IceUnlockAuthFile (
|
||||||
char *file_name
|
const char *file_name
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
@ -225,15 +215,10 @@ IceUnlockAuthFile (
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
strcpy (creat_name, file_name);
|
snprintf (creat_name, sizeof(creat_name), "%s-c", file_name);
|
||||||
strcat (creat_name, "-c");
|
|
||||||
#endif
|
|
||||||
strcpy (link_name, file_name);
|
|
||||||
strcat (link_name, "-l");
|
|
||||||
|
|
||||||
#ifndef WIN32
|
|
||||||
unlink (creat_name);
|
unlink (creat_name);
|
||||||
#endif
|
#endif
|
||||||
|
snprintf (link_name, sizeof(link_name), "%s-l", file_name);
|
||||||
unlink (link_name);
|
unlink (link_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,7 +255,7 @@ IceReadAuthFileEntry (
|
|||||||
&local.auth_data_length, &local.auth_data))
|
&local.auth_data_length, &local.auth_data))
|
||||||
goto bad;
|
goto bad;
|
||||||
|
|
||||||
if (!(ret = (IceAuthFileEntry *) malloc (sizeof (IceAuthFileEntry))))
|
if (!(ret = malloc (sizeof (IceAuthFileEntry))))
|
||||||
goto bad;
|
goto bad;
|
||||||
|
|
||||||
*ret = local;
|
*ret = local;
|
||||||
@ -302,7 +287,7 @@ IceFreeAuthFileEntry (
|
|||||||
if (auth->network_id) free (auth->network_id);
|
if (auth->network_id) free (auth->network_id);
|
||||||
if (auth->auth_name) free (auth->auth_name);
|
if (auth->auth_name) free (auth->auth_name);
|
||||||
if (auth->auth_data) free (auth->auth_data);
|
if (auth->auth_data) free (auth->auth_data);
|
||||||
free ((char *) auth);
|
free (auth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -387,7 +372,7 @@ read_short (FILE *file, unsigned short *shortp)
|
|||||||
{
|
{
|
||||||
unsigned char file_short[2];
|
unsigned char file_short[2];
|
||||||
|
|
||||||
if (fread ((char *) file_short, (int) sizeof (file_short), 1, file) != 1)
|
if (fread (file_short, sizeof (file_short), 1, file) != 1)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
*shortp = file_short[0] * 256 + file_short[1];
|
*shortp = file_short[0] * 256 + file_short[1];
|
||||||
@ -412,7 +397,7 @@ read_string (FILE *file, char **stringp)
|
|||||||
|
|
||||||
if (len != 0)
|
if (len != 0)
|
||||||
{
|
{
|
||||||
if (fread (data, (int) sizeof (char), (int) len, file) != len)
|
if (fread (data, sizeof (char), len, file) != len)
|
||||||
{
|
{
|
||||||
free (data);
|
free (data);
|
||||||
return (0);
|
return (0);
|
||||||
@ -447,7 +432,7 @@ read_counted_string (FILE *file, unsigned short *countp, char **stringp)
|
|||||||
if (!data)
|
if (!data)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
if (fread (data, (int) sizeof (char), (int) len, file) != len)
|
if (fread (data, sizeof (char), len, file) != len)
|
||||||
{
|
{
|
||||||
free (data);
|
free (data);
|
||||||
return (0);
|
return (0);
|
||||||
@ -469,7 +454,7 @@ write_short (FILE *file, unsigned short s)
|
|||||||
file_short[0] = (s & (unsigned) 0xff00) >> 8;
|
file_short[0] = (s & (unsigned) 0xff00) >> 8;
|
||||||
file_short[1] = s & 0xff;
|
file_short[1] = s & 0xff;
|
||||||
|
|
||||||
if (fwrite ((char *) file_short, (int) sizeof (file_short), 1, file) != 1)
|
if (fwrite (file_short, sizeof (file_short), 1, file) != 1)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
return (1);
|
return (1);
|
||||||
@ -477,27 +462,24 @@ write_short (FILE *file, unsigned short s)
|
|||||||
|
|
||||||
|
|
||||||
static Status
|
static Status
|
||||||
write_string (FILE *file, char *string)
|
write_string (FILE *file, const char *string)
|
||||||
{
|
{
|
||||||
unsigned short count = strlen (string);
|
size_t count = strlen (string);
|
||||||
|
|
||||||
if (!write_short (file, count))
|
if (count > USHRT_MAX)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
if (fwrite (string, (int) sizeof (char), (int) count, file) != count)
|
return write_counted_string (file, (unsigned short) count, string);
|
||||||
return (0);
|
|
||||||
|
|
||||||
return (1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Status
|
static Status
|
||||||
write_counted_string (FILE *file, unsigned short count, char *string)
|
write_counted_string (FILE *file, unsigned short count, const char *string)
|
||||||
{
|
{
|
||||||
if (!write_short (file, count))
|
if (!write_short (file, count))
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
if (fwrite (string, (int) sizeof (char), (int) count, file) != count)
|
if (fwrite (string, sizeof (char), count, file) != count)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
return (1);
|
return (1);
|
||||||
|
@ -144,7 +144,7 @@ IceOpenConnection (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((iceConn = (IceConn) malloc (sizeof (struct _IceConn))) == NULL)
|
if ((iceConn = malloc (sizeof (struct _IceConn))) == NULL)
|
||||||
{
|
{
|
||||||
strncpy (errorStringRet, "Can't malloc", errorLength);
|
strncpy (errorStringRet, "Can't malloc", errorLength);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
@ -158,7 +158,7 @@ IceOpenConnection (
|
|||||||
if ((iceConn->trans_conn = ConnectToPeer (networkIdsList,
|
if ((iceConn->trans_conn = ConnectToPeer (networkIdsList,
|
||||||
&iceConn->connection_string)) == NULL)
|
&iceConn->connection_string)) == NULL)
|
||||||
{
|
{
|
||||||
free ((char *) iceConn);
|
free (iceConn);
|
||||||
strncpy (errorStringRet, "Could not open network socket", errorLength);
|
strncpy (errorStringRet, "Could not open network socket", errorLength);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
@ -194,8 +194,7 @@ IceOpenConnection (
|
|||||||
iceConn->connect_to_me = NULL;
|
iceConn->connect_to_me = NULL;
|
||||||
iceConn->protosetup_to_me = NULL;
|
iceConn->protosetup_to_me = NULL;
|
||||||
|
|
||||||
if ((iceConn->inbuf = iceConn->inbufptr =
|
if ((iceConn->inbuf = iceConn->inbufptr = malloc (ICE_INBUFSIZE)) == NULL)
|
||||||
(char *) malloc (ICE_INBUFSIZE)) == NULL)
|
|
||||||
{
|
{
|
||||||
_IceFreeConnection (iceConn);
|
_IceFreeConnection (iceConn);
|
||||||
strncpy (errorStringRet, "Can't malloc", errorLength);
|
strncpy (errorStringRet, "Can't malloc", errorLength);
|
||||||
@ -204,8 +203,7 @@ IceOpenConnection (
|
|||||||
|
|
||||||
iceConn->inbufmax = iceConn->inbuf + ICE_INBUFSIZE;
|
iceConn->inbufmax = iceConn->inbuf + ICE_INBUFSIZE;
|
||||||
|
|
||||||
if ((iceConn->outbuf = iceConn->outbufptr =
|
if ((iceConn->outbuf = iceConn->outbufptr = calloc (1, ICE_OUTBUFSIZE)) == NULL)
|
||||||
(char *) calloc (1, ICE_OUTBUFSIZE)) == NULL)
|
|
||||||
{
|
{
|
||||||
_IceFreeConnection (iceConn);
|
_IceFreeConnection (iceConn);
|
||||||
strncpy (errorStringRet, "Can't malloc", errorLength);
|
strncpy (errorStringRet, "Can't malloc", errorLength);
|
||||||
@ -224,8 +222,7 @@ IceOpenConnection (
|
|||||||
iceConn->saved_reply_waits = NULL;
|
iceConn->saved_reply_waits = NULL;
|
||||||
iceConn->ping_waits = NULL;
|
iceConn->ping_waits = NULL;
|
||||||
|
|
||||||
iceConn->connect_to_you = (_IceConnectToYouInfo *) malloc (
|
iceConn->connect_to_you = malloc (sizeof (_IceConnectToYouInfo));
|
||||||
sizeof (_IceConnectToYouInfo));
|
|
||||||
iceConn->connect_to_you->auth_active = 0;
|
iceConn->connect_to_you->auth_active = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -392,7 +389,7 @@ IceOpenConnection (
|
|||||||
iceConn->connection_string;
|
iceConn->connection_string;
|
||||||
_IceConnectionCount++;
|
_IceConnectionCount++;
|
||||||
|
|
||||||
free ((char *) iceConn->connect_to_you);
|
free (iceConn->connect_to_you);
|
||||||
iceConn->connect_to_you = NULL;
|
iceConn->connect_to_you = NULL;
|
||||||
|
|
||||||
iceConn->connection_status = IceConnectAccepted;
|
iceConn->connection_status = IceConnectAccepted;
|
||||||
@ -451,9 +448,9 @@ ConnectToPeer (char *networkIdsList, char **actualConnectionRet)
|
|||||||
char* address;
|
char* address;
|
||||||
char *ptr, *endptr, *delim;
|
char *ptr, *endptr, *delim;
|
||||||
int madeConnection = 0;
|
int madeConnection = 0;
|
||||||
int len, retry;
|
size_t len;
|
||||||
int connect_stat;
|
int retry, connect_stat;
|
||||||
int address_size;
|
size_t address_size;
|
||||||
XtransConnInfo trans_conn = NULL;
|
XtransConnInfo trans_conn = NULL;
|
||||||
|
|
||||||
*actualConnectionRet = NULL;
|
*actualConnectionRet = NULL;
|
||||||
|
@ -70,7 +70,7 @@ _IceGetPoAuthData (
|
|||||||
{
|
{
|
||||||
*authDataLenRet = entry->auth_data_length;
|
*authDataLenRet = entry->auth_data_length;
|
||||||
|
|
||||||
if ((*authDataRet = (char *) malloc (entry->auth_data_length)) != NULL)
|
if ((*authDataRet = malloc (entry->auth_data_length)) != NULL)
|
||||||
memcpy (*authDataRet, entry->auth_data, entry->auth_data_length);
|
memcpy (*authDataRet, entry->auth_data, entry->auth_data_length);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -111,7 +111,7 @@ _IceGetPaAuthData (
|
|||||||
{
|
{
|
||||||
*authDataLenRet = entry->auth_data_length;
|
*authDataLenRet = entry->auth_data_length;
|
||||||
|
|
||||||
if ((*authDataRet = (char *) malloc (entry->auth_data_length)) != NULL)
|
if ((*authDataRet = malloc (entry->auth_data_length)) != NULL)
|
||||||
memcpy (*authDataRet, entry->auth_data, entry->auth_data_length);
|
memcpy (*authDataRet, entry->auth_data, entry->auth_data_length);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -26,15 +26,9 @@ in this Software without prior written authorization from The Open Group.
|
|||||||
Author: Ralph Mor, X Consortium
|
Author: Ralph Mor, X Consortium
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#ifndef __UNIXOS2__
|
|
||||||
IceConn _IceConnectionObjs[256];
|
IceConn _IceConnectionObjs[256];
|
||||||
char *_IceConnectionStrings[256];
|
char *_IceConnectionStrings[256];
|
||||||
_IceProtocol _IceProtocols[255];
|
_IceProtocol _IceProtocols[255];
|
||||||
#else
|
|
||||||
IceConn _IceConnectionObjs[256] = {0};
|
|
||||||
char *_IceConnectionStrings[256] = {0};
|
|
||||||
_IceProtocol _IceProtocols[255] = {0};
|
|
||||||
#endif
|
|
||||||
int _IceConnectionCount = 0;
|
int _IceConnectionCount = 0;
|
||||||
|
|
||||||
int _IceLastMajorOpcode = 0;
|
int _IceLastMajorOpcode = 0;
|
||||||
|
@ -36,6 +36,10 @@ Author: Ralph Mor, X Consortium
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#define Time_t time_t
|
#define Time_t time_t
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBBSD
|
||||||
|
#include <bsd/stdlib.h> /* for arc4random_buf() */
|
||||||
|
#endif
|
||||||
|
|
||||||
static int was_called_state;
|
static int was_called_state;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -50,12 +54,14 @@ IceGenerateMagicCookie (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
char *auth;
|
char *auth;
|
||||||
|
#ifndef HAVE_ARC4RANDOM_BUF
|
||||||
long ldata[2];
|
long ldata[2];
|
||||||
int seed;
|
int seed;
|
||||||
int value;
|
int value;
|
||||||
int i;
|
int i;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ((auth = (char *) malloc (len + 1)) == NULL)
|
if ((auth = malloc (len + 1)) == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
#ifdef HAVE_ARC4RANDOM_BUF
|
#ifdef HAVE_ARC4RANDOM_BUF
|
||||||
@ -70,9 +76,7 @@ IceGenerateMagicCookie (
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
#ifndef __UNIXOS2__
|
|
||||||
long time ();
|
long time ();
|
||||||
#endif
|
|
||||||
ldata[0] = time ((long *) 0);
|
ldata[0] = time ((long *) 0);
|
||||||
ldata[1] = getpid ();
|
ldata[1] = getpid ();
|
||||||
}
|
}
|
||||||
|
@ -62,12 +62,11 @@ IceListenForConnections (
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((listenObjs = (struct _IceListenObj *) malloc (
|
if ((listenObjs = malloc (transCount * sizeof (struct _IceListenObj))) == NULL)
|
||||||
transCount * sizeof (struct _IceListenObj))) == NULL)
|
|
||||||
{
|
{
|
||||||
for (i = 0; i < transCount; i++)
|
for (i = 0; i < transCount; i++)
|
||||||
_IceTransClose (transConns[i]);
|
_IceTransClose (transConns[i]);
|
||||||
free ((char *) transConns);
|
free (transConns);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,8 +98,7 @@ IceListenForConnections (
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*listenObjsRet = (IceListenObj *) malloc (
|
*listenObjsRet = malloc (*countRet * sizeof (IceListenObj));
|
||||||
*countRet * sizeof (IceListenObj));
|
|
||||||
|
|
||||||
if (*listenObjsRet == NULL)
|
if (*listenObjsRet == NULL)
|
||||||
{
|
{
|
||||||
@ -112,17 +110,16 @@ IceListenForConnections (
|
|||||||
{
|
{
|
||||||
for (i = 0; i < *countRet; i++)
|
for (i = 0; i < *countRet; i++)
|
||||||
{
|
{
|
||||||
(*listenObjsRet)[i] = (IceListenObj) malloc (
|
(*listenObjsRet)[i] = malloc (sizeof (struct _IceListenObj));
|
||||||
sizeof (struct _IceListenObj));
|
|
||||||
|
|
||||||
if ((*listenObjsRet)[i] == NULL)
|
if ((*listenObjsRet)[i] == NULL)
|
||||||
{
|
{
|
||||||
strncpy (errorStringRet, "Malloc failed", errorLength);
|
strncpy (errorStringRet, "Malloc failed", errorLength);
|
||||||
|
|
||||||
for (j = 0; j < i; j++)
|
for (j = 0; j < i; j++)
|
||||||
free ((char *) (*listenObjsRet)[j]);
|
free ((*listenObjsRet)[j]);
|
||||||
|
|
||||||
free ((char *) *listenObjsRet);
|
free (*listenObjsRet);
|
||||||
*listenObjsRet = NULL;
|
*listenObjsRet = NULL;
|
||||||
|
|
||||||
status = 0;
|
status = 0;
|
||||||
@ -152,8 +149,8 @@ IceListenForConnections (
|
|||||||
_IceTransClose (transConns[i]);
|
_IceTransClose (transConns[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
free ((char *) listenObjs);
|
free (listenObjs);
|
||||||
free ((char *) transConns);
|
free (transConns);
|
||||||
|
|
||||||
return (status);
|
return (status);
|
||||||
}
|
}
|
||||||
@ -196,7 +193,7 @@ IceComposeNetworkIdList (
|
|||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
len += (strlen (listenObjs[i]->network_id) + 1);
|
len += (strlen (listenObjs[i]->network_id) + 1);
|
||||||
|
|
||||||
list = (char *) malloc (len);
|
list = malloc (len);
|
||||||
|
|
||||||
if (list == NULL)
|
if (list == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
@ -249,10 +246,10 @@ IceFreeListenObjs (
|
|||||||
{
|
{
|
||||||
free (listenObjs[i]->network_id);
|
free (listenObjs[i]->network_id);
|
||||||
_IceTransClose (listenObjs[i]->trans_conn);
|
_IceTransClose (listenObjs[i]->trans_conn);
|
||||||
free ((char *) listenObjs[i]);
|
free (listenObjs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
free ((char *) listenObjs);
|
free (listenObjs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -64,12 +64,11 @@ IceListenForWellKnownConnections (
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((listenObjs = (struct _IceListenObj *) malloc (
|
if ((listenObjs = malloc (transCount * sizeof (struct _IceListenObj))) == NULL)
|
||||||
transCount * sizeof (struct _IceListenObj))) == NULL)
|
|
||||||
{
|
{
|
||||||
for (i = 0; i < transCount; i++)
|
for (i = 0; i < transCount; i++)
|
||||||
_IceTransClose (transConns[i]);
|
_IceTransClose (transConns[i]);
|
||||||
free ((char *) transConns);
|
free (transConns);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,8 +98,7 @@ IceListenForWellKnownConnections (
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*listenObjsRet = (IceListenObj *) malloc (
|
*listenObjsRet = malloc (*countRet * sizeof (IceListenObj));
|
||||||
*countRet * sizeof (IceListenObj));
|
|
||||||
|
|
||||||
if (*listenObjsRet == NULL)
|
if (*listenObjsRet == NULL)
|
||||||
{
|
{
|
||||||
@ -112,17 +110,16 @@ IceListenForWellKnownConnections (
|
|||||||
{
|
{
|
||||||
for (i = 0; i < *countRet; i++)
|
for (i = 0; i < *countRet; i++)
|
||||||
{
|
{
|
||||||
(*listenObjsRet)[i] = (IceListenObj) malloc (
|
(*listenObjsRet)[i] = malloc (sizeof (struct _IceListenObj));
|
||||||
sizeof (struct _IceListenObj));
|
|
||||||
|
|
||||||
if ((*listenObjsRet)[i] == NULL)
|
if ((*listenObjsRet)[i] == NULL)
|
||||||
{
|
{
|
||||||
strncpy (errorStringRet, "Malloc failed", errorLength);
|
strncpy (errorStringRet, "Malloc failed", errorLength);
|
||||||
|
|
||||||
for (j = 0; j < i; j++)
|
for (j = 0; j < i; j++)
|
||||||
free ((char *) (*listenObjsRet)[j]);
|
free ((*listenObjsRet)[j]);
|
||||||
|
|
||||||
free ((char *) *listenObjsRet);
|
free (*listenObjsRet);
|
||||||
*listenObjsRet = NULL;
|
*listenObjsRet = NULL;
|
||||||
|
|
||||||
status = 0;
|
status = 0;
|
||||||
@ -152,8 +149,8 @@ IceListenForWellKnownConnections (
|
|||||||
_IceTransClose (transConns[i]);
|
_IceTransClose (transConns[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
free ((char *) listenObjs);
|
free (listenObjs);
|
||||||
free ((char *) transConns);
|
free (transConns);
|
||||||
|
|
||||||
return (status);
|
return (status);
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ IceAllocScratch (
|
|||||||
if (iceConn->scratch)
|
if (iceConn->scratch)
|
||||||
free (iceConn->scratch);
|
free (iceConn->scratch);
|
||||||
|
|
||||||
iceConn->scratch = (char *) malloc ((unsigned) size);
|
iceConn->scratch = malloc (size);
|
||||||
iceConn->scratch_size = size;
|
iceConn->scratch_size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,91 +406,6 @@ _IceWrite (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WORD64
|
|
||||||
|
|
||||||
IceWriteData16 (
|
|
||||||
IceConn iceConn,
|
|
||||||
unsigned long nbytes,
|
|
||||||
short *data
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int numShorts = nbytes / 2;
|
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
while (index < numShorts)
|
|
||||||
{
|
|
||||||
int spaceLeft, count, i;
|
|
||||||
int shortsLeft = numShorts - index;
|
|
||||||
|
|
||||||
spaceLeft = iceConn->outbufmax - iceConn->outbufptr - 1;
|
|
||||||
|
|
||||||
if (spaceLeft < 2)
|
|
||||||
{
|
|
||||||
IceFlush (iceConn);
|
|
||||||
spaceLeft = iceConn->outbufmax - iceConn->outbufptr - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
count = (shortsLeft < spaceLeft / 2) ? shortsLeft : spaceLeft / 2;
|
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
|
||||||
STORE_CARD16 (iceConn->outbufptr, data[index++]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
IceWriteData32 (
|
|
||||||
IceConn iceConn,
|
|
||||||
unsigned long nbytes,
|
|
||||||
int *data
|
|
||||||
)
|
|
||||||
{
|
|
||||||
int numLongs = nbytes / 4;
|
|
||||||
int index = 0;
|
|
||||||
|
|
||||||
while (index < numLongs)
|
|
||||||
{
|
|
||||||
int spaceLeft, count, i;
|
|
||||||
int longsLeft = numLongs - index;
|
|
||||||
|
|
||||||
spaceLeft = iceConn->outbufmax - iceConn->outbufptr - 1;
|
|
||||||
|
|
||||||
if (spaceLeft < 4)
|
|
||||||
{
|
|
||||||
IceFlush (iceConn);
|
|
||||||
spaceLeft = iceConn->outbufmax - iceConn->outbufptr - 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
count = (longsLeft < spaceLeft / 4) ? longsLeft : spaceLeft / 4;
|
|
||||||
|
|
||||||
for (i = 0; i < count; i++)
|
|
||||||
STORE_CARD32 (iceConn->outbufptr, data[index++]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
IceReadData16 (
|
|
||||||
IceConn iceConn,
|
|
||||||
Bool swap,
|
|
||||||
unsigned long nbytes,
|
|
||||||
short *data
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* NOT IMPLEMENTED YET */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
IceReadData32 (
|
|
||||||
IceConn iceConn,
|
|
||||||
Bool swap,
|
|
||||||
unsigned long nbytes,
|
|
||||||
int *data
|
|
||||||
)
|
|
||||||
{
|
|
||||||
/* NOT IMPLEMENTED YET */
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* WORD64 */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -506,8 +421,7 @@ _IceAddOpcodeMapping (
|
|||||||
}
|
}
|
||||||
else if (iceConn->process_msg_info == NULL)
|
else if (iceConn->process_msg_info == NULL)
|
||||||
{
|
{
|
||||||
iceConn->process_msg_info = (_IceProcessMsgInfo *) malloc (
|
iceConn->process_msg_info = malloc (sizeof (_IceProcessMsgInfo));
|
||||||
sizeof (_IceProcessMsgInfo));
|
|
||||||
iceConn->his_min_opcode = iceConn->his_max_opcode = hisOpcode;
|
iceConn->his_min_opcode = iceConn->his_max_opcode = hisOpcode;
|
||||||
}
|
}
|
||||||
else if (hisOpcode < iceConn->his_min_opcode)
|
else if (hisOpcode < iceConn->his_min_opcode)
|
||||||
@ -517,14 +431,14 @@ _IceAddOpcodeMapping (
|
|||||||
int newsize = iceConn->his_max_opcode - hisOpcode + 1;
|
int newsize = iceConn->his_max_opcode - hisOpcode + 1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
iceConn->process_msg_info = (_IceProcessMsgInfo *) malloc (
|
iceConn->process_msg_info = malloc (
|
||||||
newsize * sizeof (_IceProcessMsgInfo));
|
newsize * sizeof (_IceProcessMsgInfo));
|
||||||
|
|
||||||
memcpy (&iceConn->process_msg_info[
|
memcpy (&iceConn->process_msg_info[
|
||||||
iceConn->his_min_opcode - hisOpcode], oldVec,
|
iceConn->his_min_opcode - hisOpcode], oldVec,
|
||||||
oldsize * sizeof (_IceProcessMsgInfo));
|
oldsize * sizeof (_IceProcessMsgInfo));
|
||||||
|
|
||||||
free ((char *) oldVec);
|
free (oldVec);
|
||||||
|
|
||||||
for (i = hisOpcode + 1; i < iceConn->his_min_opcode; i++)
|
for (i = hisOpcode + 1; i < iceConn->his_min_opcode; i++)
|
||||||
{
|
{
|
||||||
@ -544,13 +458,13 @@ _IceAddOpcodeMapping (
|
|||||||
int newsize = hisOpcode - iceConn->his_min_opcode + 1;
|
int newsize = hisOpcode - iceConn->his_min_opcode + 1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
iceConn->process_msg_info = (_IceProcessMsgInfo *) malloc (
|
iceConn->process_msg_info = malloc (
|
||||||
newsize * sizeof (_IceProcessMsgInfo));
|
newsize * sizeof (_IceProcessMsgInfo));
|
||||||
|
|
||||||
memcpy (iceConn->process_msg_info, oldVec,
|
memcpy (iceConn->process_msg_info, oldVec,
|
||||||
oldsize * sizeof (_IceProcessMsgInfo));
|
oldsize * sizeof (_IceProcessMsgInfo));
|
||||||
|
|
||||||
free ((char *) oldVec);
|
free (oldVec);
|
||||||
|
|
||||||
for (i = iceConn->his_max_opcode + 1; i < hisOpcode; i++)
|
for (i = iceConn->his_max_opcode + 1; i < hisOpcode; i++)
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ IcePing (
|
|||||||
IcePointer clientData
|
IcePointer clientData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_IcePingWait *newping = (_IcePingWait *) malloc (sizeof (_IcePingWait));
|
_IcePingWait *newping = malloc (sizeof (_IcePingWait));
|
||||||
_IcePingWait *ptr = iceConn->ping_waits;
|
_IcePingWait *ptr = iceConn->ping_waits;
|
||||||
|
|
||||||
if (newping == NULL)
|
if (newping == NULL)
|
||||||
|
@ -921,7 +921,7 @@ ProcessConnectionSetup (
|
|||||||
|
|
||||||
if ((hisAuthCount = message->authCount) > 0)
|
if ((hisAuthCount = message->authCount) > 0)
|
||||||
{
|
{
|
||||||
hisAuthNames = (char **) malloc (hisAuthCount * sizeof (char *));
|
hisAuthNames = malloc (hisAuthCount * sizeof (char *));
|
||||||
EXTRACT_LISTOF_STRING (pData, swap, hisAuthCount, hisAuthNames);
|
EXTRACT_LISTOF_STRING (pData, swap, hisAuthCount, hisAuthNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -960,7 +960,7 @@ ProcessConnectionSetup (
|
|||||||
for (i = 0; i < hisAuthCount; i++)
|
for (i = 0; i < hisAuthCount; i++)
|
||||||
free (hisAuthNames[i]);
|
free (hisAuthNames[i]);
|
||||||
|
|
||||||
free ((char *) hisAuthNames);
|
free (hisAuthNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
IceDisposeCompleteMessage (iceConn, pStart);
|
IceDisposeCompleteMessage (iceConn, pStart);
|
||||||
@ -1056,7 +1056,7 @@ ProcessConnectionSetup (
|
|||||||
|
|
||||||
AuthRequired (iceConn, hisAuthIndex, authDataLen, authData);
|
AuthRequired (iceConn, hisAuthIndex, authDataLen, authData);
|
||||||
|
|
||||||
iceConn->connect_to_me = setupInfo = (_IceConnectToMeInfo *)
|
iceConn->connect_to_me = setupInfo =
|
||||||
malloc (sizeof (_IceConnectToMeInfo));
|
malloc (sizeof (_IceConnectToMeInfo));
|
||||||
|
|
||||||
setupInfo->my_version_index = myVersionIndex;
|
setupInfo->my_version_index = myVersionIndex;
|
||||||
@ -1078,7 +1078,7 @@ ProcessConnectionSetup (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (authData && authDataLen > 0)
|
if (authData && authDataLen > 0)
|
||||||
free ((char *) authData);
|
free (authData);
|
||||||
|
|
||||||
if (errorString)
|
if (errorString)
|
||||||
free (errorString);
|
free (errorString);
|
||||||
@ -1098,7 +1098,7 @@ ProcessConnectionSetup (
|
|||||||
for (i = 0; i < hisAuthCount; i++)
|
for (i = 0; i < hisAuthCount; i++)
|
||||||
free (hisAuthNames[i]);
|
free (hisAuthNames[i]);
|
||||||
|
|
||||||
free ((char *) hisAuthNames);
|
free (hisAuthNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
IceDisposeCompleteMessage (iceConn, pStart);
|
IceDisposeCompleteMessage (iceConn, pStart);
|
||||||
@ -1292,7 +1292,7 @@ ProcessAuthRequired (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (replyData && replyDataLen > 0)
|
if (replyData && replyDataLen > 0)
|
||||||
free ((char *) replyData);
|
free (replyData);
|
||||||
|
|
||||||
IceDisposeCompleteMessage (iceConn, authData);
|
IceDisposeCompleteMessage (iceConn, authData);
|
||||||
|
|
||||||
@ -1377,7 +1377,7 @@ ProcessAuthReply (
|
|||||||
{
|
{
|
||||||
free (iceConn->connect_to_me->his_vendor);
|
free (iceConn->connect_to_me->his_vendor);
|
||||||
free (iceConn->connect_to_me->his_release);
|
free (iceConn->connect_to_me->his_release);
|
||||||
free ((char *) iceConn->connect_to_me);
|
free (iceConn->connect_to_me);
|
||||||
iceConn->connect_to_me = NULL;
|
iceConn->connect_to_me = NULL;
|
||||||
|
|
||||||
iceConn->connection_status = IceConnectRejected;
|
iceConn->connection_status = IceConnectRejected;
|
||||||
@ -1405,7 +1405,7 @@ ProcessAuthReply (
|
|||||||
iceConn->my_ice_version_index =
|
iceConn->my_ice_version_index =
|
||||||
iceConn->connect_to_me->my_version_index;
|
iceConn->connect_to_me->my_version_index;
|
||||||
|
|
||||||
free ((char *) iceConn->connect_to_me);
|
free (iceConn->connect_to_me);
|
||||||
iceConn->connect_to_me = NULL;
|
iceConn->connect_to_me = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1571,7 +1571,7 @@ ProcessAuthReply (
|
|||||||
free (iceConn->protosetup_to_me->his_vendor);
|
free (iceConn->protosetup_to_me->his_vendor);
|
||||||
if (iceConn->protosetup_to_me->his_release)
|
if (iceConn->protosetup_to_me->his_release)
|
||||||
free (iceConn->protosetup_to_me->his_release);
|
free (iceConn->protosetup_to_me->his_release);
|
||||||
free ((char *) iceConn->protosetup_to_me);
|
free (iceConn->protosetup_to_me);
|
||||||
iceConn->protosetup_to_me = NULL;
|
iceConn->protosetup_to_me = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1585,7 +1585,7 @@ ProcessAuthReply (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (authData && authDataLen > 0)
|
if (authData && authDataLen > 0)
|
||||||
free ((char *) authData);
|
free (authData);
|
||||||
|
|
||||||
if (errorString)
|
if (errorString)
|
||||||
free (errorString);
|
free (errorString);
|
||||||
@ -1719,7 +1719,7 @@ ProcessAuthNextPhase (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (replyData && replyDataLen > 0)
|
if (replyData && replyDataLen > 0)
|
||||||
free ((char *) replyData);
|
free (replyData);
|
||||||
|
|
||||||
IceDisposeCompleteMessage (iceConn, authData);
|
IceDisposeCompleteMessage (iceConn, authData);
|
||||||
|
|
||||||
@ -1967,7 +1967,7 @@ ProcessProtocolSetup (
|
|||||||
|
|
||||||
if ((hisAuthCount = message->authCount) > 0)
|
if ((hisAuthCount = message->authCount) > 0)
|
||||||
{
|
{
|
||||||
hisAuthNames = (char **) malloc (hisAuthCount * sizeof (char *));
|
hisAuthNames = malloc (hisAuthCount * sizeof (char *));
|
||||||
EXTRACT_LISTOF_STRING (pData, swap, hisAuthCount, hisAuthNames);
|
EXTRACT_LISTOF_STRING (pData, swap, hisAuthCount, hisAuthNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2005,7 +2005,7 @@ ProcessProtocolSetup (
|
|||||||
for (i = 0; i < hisAuthCount; i++)
|
for (i = 0; i < hisAuthCount; i++)
|
||||||
free (hisAuthNames[i]);
|
free (hisAuthNames[i]);
|
||||||
|
|
||||||
free ((char *) hisAuthNames);
|
free (hisAuthNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
IceDisposeCompleteMessage (iceConn, pStart);
|
IceDisposeCompleteMessage (iceConn, pStart);
|
||||||
@ -2097,8 +2097,7 @@ ProcessProtocolSetup (
|
|||||||
AuthRequired (iceConn, hisAuthIndex, authDataLen, authData);
|
AuthRequired (iceConn, hisAuthIndex, authDataLen, authData);
|
||||||
|
|
||||||
iceConn->protosetup_to_me = setupInfo =
|
iceConn->protosetup_to_me = setupInfo =
|
||||||
(_IceProtoSetupToMeInfo *) malloc (
|
malloc (sizeof (_IceProtoSetupToMeInfo));
|
||||||
sizeof (_IceProtoSetupToMeInfo));
|
|
||||||
|
|
||||||
setupInfo->his_opcode = hisOpcode;
|
setupInfo->his_opcode = hisOpcode;
|
||||||
setupInfo->my_opcode = myOpcode;
|
setupInfo->my_opcode = myOpcode;
|
||||||
@ -2117,7 +2116,7 @@ ProcessProtocolSetup (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (authData && authDataLen > 0)
|
if (authData && authDataLen > 0)
|
||||||
free ((char *) authData);
|
free (authData);
|
||||||
|
|
||||||
if (errorString)
|
if (errorString)
|
||||||
free (errorString);
|
free (errorString);
|
||||||
@ -2219,7 +2218,7 @@ ProcessProtocolSetup (
|
|||||||
for (i = 0; i < hisAuthCount; i++)
|
for (i = 0; i < hisAuthCount; i++)
|
||||||
free (hisAuthNames[i]);
|
free (hisAuthNames[i]);
|
||||||
|
|
||||||
free ((char *) hisAuthNames);
|
free (hisAuthNames);
|
||||||
}
|
}
|
||||||
|
|
||||||
IceDisposeCompleteMessage (iceConn, pStart);
|
IceDisposeCompleteMessage (iceConn, pStart);
|
||||||
@ -2364,7 +2363,7 @@ ProcessPingReply (
|
|||||||
(*iceConn->ping_waits->ping_reply_proc) (iceConn,
|
(*iceConn->ping_waits->ping_reply_proc) (iceConn,
|
||||||
iceConn->ping_waits->client_data);
|
iceConn->ping_waits->client_data);
|
||||||
|
|
||||||
free ((char *) iceConn->ping_waits);
|
free (iceConn->ping_waits);
|
||||||
iceConn->ping_waits = next;
|
iceConn->ping_waits = next;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -112,7 +112,7 @@ IceProtocolSetup (
|
|||||||
|
|
||||||
if (myProtocol->orig_client->auth_count > 0)
|
if (myProtocol->orig_client->auth_count > 0)
|
||||||
{
|
{
|
||||||
authIndices = (int *) malloc (
|
authIndices = malloc (
|
||||||
myProtocol->orig_client->auth_count * sizeof (int));
|
myProtocol->orig_client->auth_count * sizeof (int));
|
||||||
|
|
||||||
_IceGetPoValidAuthIndices (myProtocol->protocol_name,
|
_IceGetPoValidAuthIndices (myProtocol->protocol_name,
|
||||||
@ -181,8 +181,7 @@ IceProtocolSetup (
|
|||||||
replyWait.minor_opcode_of_request = ICE_ProtocolSetup;
|
replyWait.minor_opcode_of_request = ICE_ProtocolSetup;
|
||||||
replyWait.reply = (IcePointer) &reply;
|
replyWait.reply = (IcePointer) &reply;
|
||||||
|
|
||||||
iceConn->protosetup_to_you = (_IceProtoSetupToYouInfo *) malloc (
|
iceConn->protosetup_to_you = malloc (sizeof (_IceProtoSetupToYouInfo));
|
||||||
sizeof (_IceProtoSetupToYouInfo));
|
|
||||||
iceConn->protosetup_to_you->my_opcode = myOpcode;
|
iceConn->protosetup_to_you->my_opcode = myOpcode;
|
||||||
iceConn->protosetup_to_you->my_auth_count = authCount;
|
iceConn->protosetup_to_you->my_auth_count = authCount;
|
||||||
iceConn->protosetup_to_you->auth_active = 0;
|
iceConn->protosetup_to_you->auth_active = 0;
|
||||||
@ -237,8 +236,8 @@ IceProtocolSetup (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (iceConn->protosetup_to_you->my_auth_indices)
|
if (iceConn->protosetup_to_you->my_auth_indices)
|
||||||
free ((char *) iceConn->protosetup_to_you->my_auth_indices);
|
free (iceConn->protosetup_to_you->my_auth_indices);
|
||||||
free ((char *) iceConn->protosetup_to_you);
|
free (iceConn->protosetup_to_you);
|
||||||
iceConn->protosetup_to_you = NULL;
|
iceConn->protosetup_to_you = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,8 +67,7 @@ IceRegisterForProtocolSetup (
|
|||||||
|
|
||||||
if (i <= _IceLastMajorOpcode)
|
if (i <= _IceLastMajorOpcode)
|
||||||
{
|
{
|
||||||
p = _IceProtocols[i - 1].orig_client =
|
p = _IceProtocols[i - 1].orig_client = malloc (sizeof(_IcePoProtocol));
|
||||||
(_IcePoProtocol *) malloc (sizeof (_IcePoProtocol));
|
|
||||||
opcodeRet = i;
|
opcodeRet = i;
|
||||||
}
|
}
|
||||||
else if (_IceLastMajorOpcode == 255 ||
|
else if (_IceLastMajorOpcode == 255 ||
|
||||||
@ -79,13 +78,11 @@ IceRegisterForProtocolSetup (
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *name;
|
_IceProtocols[_IceLastMajorOpcode].protocol_name =
|
||||||
|
|
||||||
_IceProtocols[_IceLastMajorOpcode].protocol_name = name =
|
|
||||||
strdup(protocolName);
|
strdup(protocolName);
|
||||||
|
|
||||||
p = _IceProtocols[_IceLastMajorOpcode].orig_client =
|
p = _IceProtocols[_IceLastMajorOpcode].orig_client =
|
||||||
(_IcePoProtocol *) malloc (sizeof (_IcePoProtocol));
|
malloc (sizeof (_IcePoProtocol));
|
||||||
|
|
||||||
_IceProtocols[_IceLastMajorOpcode].accept_client = NULL;
|
_IceProtocols[_IceLastMajorOpcode].accept_client = NULL;
|
||||||
|
|
||||||
@ -97,18 +94,15 @@ IceRegisterForProtocolSetup (
|
|||||||
|
|
||||||
p->version_count = versionCount;
|
p->version_count = versionCount;
|
||||||
|
|
||||||
p->version_recs = (IcePoVersionRec *) malloc (
|
p->version_recs = malloc (versionCount * sizeof (IcePoVersionRec));
|
||||||
versionCount * sizeof (IcePoVersionRec));
|
|
||||||
memcpy (p->version_recs, versionRecs,
|
memcpy (p->version_recs, versionRecs,
|
||||||
versionCount * sizeof (IcePoVersionRec));
|
versionCount * sizeof (IcePoVersionRec));
|
||||||
|
|
||||||
if ((p->auth_count = authCount) > 0)
|
if ((p->auth_count = authCount) > 0)
|
||||||
{
|
{
|
||||||
p->auth_names = (char **) malloc (
|
p->auth_names = malloc (authCount * sizeof (char *));
|
||||||
authCount * sizeof (char *));
|
|
||||||
|
|
||||||
p->auth_procs = (IcePoAuthProc *) malloc (
|
p->auth_procs = malloc (authCount * sizeof (IcePoAuthProc));
|
||||||
authCount * sizeof (IcePoAuthProc));
|
|
||||||
|
|
||||||
for (i = 0; i < authCount; i++)
|
for (i = 0; i < authCount; i++)
|
||||||
{
|
{
|
||||||
@ -169,7 +163,7 @@ IceRegisterForProtocolReply (
|
|||||||
if (i <= _IceLastMajorOpcode)
|
if (i <= _IceLastMajorOpcode)
|
||||||
{
|
{
|
||||||
p = _IceProtocols[i - 1].accept_client =
|
p = _IceProtocols[i - 1].accept_client =
|
||||||
(_IcePaProtocol *) malloc (sizeof (_IcePaProtocol));
|
malloc (sizeof (_IcePaProtocol));
|
||||||
opcodeRet = i;
|
opcodeRet = i;
|
||||||
}
|
}
|
||||||
else if (_IceLastMajorOpcode == 255 ||
|
else if (_IceLastMajorOpcode == 255 ||
|
||||||
@ -180,15 +174,13 @@ IceRegisterForProtocolReply (
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *name;
|
_IceProtocols[_IceLastMajorOpcode].protocol_name =
|
||||||
|
|
||||||
_IceProtocols[_IceLastMajorOpcode].protocol_name = name =
|
|
||||||
strdup(protocolName);
|
strdup(protocolName);
|
||||||
|
|
||||||
_IceProtocols[_IceLastMajorOpcode].orig_client = NULL;
|
_IceProtocols[_IceLastMajorOpcode].orig_client = NULL;
|
||||||
|
|
||||||
p = _IceProtocols[_IceLastMajorOpcode].accept_client =
|
p = _IceProtocols[_IceLastMajorOpcode].accept_client =
|
||||||
(_IcePaProtocol *) malloc (sizeof (_IcePaProtocol));
|
malloc (sizeof (_IcePaProtocol));
|
||||||
|
|
||||||
opcodeRet = ++_IceLastMajorOpcode;
|
opcodeRet = ++_IceLastMajorOpcode;
|
||||||
}
|
}
|
||||||
@ -198,8 +190,7 @@ IceRegisterForProtocolReply (
|
|||||||
|
|
||||||
p->version_count = versionCount;
|
p->version_count = versionCount;
|
||||||
|
|
||||||
p->version_recs = (IcePaVersionRec *) malloc (
|
p->version_recs = malloc (versionCount * sizeof (IcePaVersionRec));
|
||||||
versionCount * sizeof (IcePaVersionRec));
|
|
||||||
memcpy (p->version_recs, versionRecs,
|
memcpy (p->version_recs, versionRecs,
|
||||||
versionCount * sizeof (IcePaVersionRec));
|
versionCount * sizeof (IcePaVersionRec));
|
||||||
|
|
||||||
@ -208,11 +199,9 @@ IceRegisterForProtocolReply (
|
|||||||
|
|
||||||
if ((p->auth_count = authCount) > 0)
|
if ((p->auth_count = authCount) > 0)
|
||||||
{
|
{
|
||||||
p->auth_names = (char **) malloc (
|
p->auth_names = malloc (authCount * sizeof (char *));
|
||||||
authCount * sizeof (char *));
|
|
||||||
|
|
||||||
p->auth_procs = (IcePaAuthProc *) malloc (
|
p->auth_procs = malloc (authCount * sizeof (IcePaAuthProc));
|
||||||
authCount * sizeof (IcePaAuthProc));
|
|
||||||
|
|
||||||
for (i = 0; i < authCount; i++)
|
for (i = 0; i < authCount; i++)
|
||||||
{
|
{
|
||||||
|
@ -59,8 +59,7 @@ _IceAddReplyWait (
|
|||||||
last = last->next;
|
last = last->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
savedReplyWait = (_IceSavedReplyWait *) malloc (
|
savedReplyWait = malloc (sizeof (_IceSavedReplyWait));
|
||||||
sizeof (_IceSavedReplyWait));
|
|
||||||
|
|
||||||
savedReplyWait->reply_wait = replyWait;
|
savedReplyWait->reply_wait = replyWait;
|
||||||
savedReplyWait->reply_ready = False;
|
savedReplyWait->reply_ready = False;
|
||||||
@ -149,7 +148,7 @@ _IceCheckReplyReady (
|
|||||||
else
|
else
|
||||||
prev->next = savedReplyWait->next;
|
prev->next = savedReplyWait->next;
|
||||||
|
|
||||||
free ((char *) savedReplyWait);
|
free (savedReplyWait);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (ready);
|
return (ready);
|
||||||
|
@ -50,11 +50,7 @@ Author: Ralph Mor, X Consortium
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int _IcePaAuthDataEntryCount = 0;
|
int _IcePaAuthDataEntryCount = 0;
|
||||||
#ifndef __UNIXOS2__
|
|
||||||
IceAuthDataEntry _IcePaAuthDataEntries[ICE_MAX_AUTH_DATA_ENTRIES];
|
IceAuthDataEntry _IcePaAuthDataEntries[ICE_MAX_AUTH_DATA_ENTRIES];
|
||||||
#else
|
|
||||||
IceAuthDataEntry _IcePaAuthDataEntries[ICE_MAX_AUTH_DATA_ENTRIES] = {0};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -104,7 +100,7 @@ IceSetPaAuthData (
|
|||||||
|
|
||||||
_IcePaAuthDataEntries[j].auth_data_length =
|
_IcePaAuthDataEntries[j].auth_data_length =
|
||||||
entries[i].auth_data_length;
|
entries[i].auth_data_length;
|
||||||
_IcePaAuthDataEntries[j].auth_data = (char *) malloc (
|
_IcePaAuthDataEntries[j].auth_data = malloc (
|
||||||
entries[i].auth_data_length);
|
entries[i].auth_data_length);
|
||||||
memcpy (_IcePaAuthDataEntries[j].auth_data,
|
memcpy (_IcePaAuthDataEntries[j].auth_data,
|
||||||
entries[i].auth_data, entries[i].auth_data_length);
|
entries[i].auth_data, entries[i].auth_data_length);
|
||||||
|
@ -301,21 +301,21 @@ _IceFreeConnection (
|
|||||||
free (iceConn->scratch);
|
free (iceConn->scratch);
|
||||||
|
|
||||||
if (iceConn->process_msg_info)
|
if (iceConn->process_msg_info)
|
||||||
free ((char *) iceConn->process_msg_info);
|
free (iceConn->process_msg_info);
|
||||||
|
|
||||||
if (iceConn->connect_to_you)
|
if (iceConn->connect_to_you)
|
||||||
free ((char *) iceConn->connect_to_you);
|
free (iceConn->connect_to_you);
|
||||||
|
|
||||||
if (iceConn->protosetup_to_you)
|
if (iceConn->protosetup_to_you)
|
||||||
free ((char *) iceConn->protosetup_to_you);
|
free (iceConn->protosetup_to_you);
|
||||||
|
|
||||||
if (iceConn->connect_to_me)
|
if (iceConn->connect_to_me)
|
||||||
free ((char *) iceConn->connect_to_me);
|
free (iceConn->connect_to_me);
|
||||||
|
|
||||||
if (iceConn->protosetup_to_me)
|
if (iceConn->protosetup_to_me)
|
||||||
free ((char *) iceConn->protosetup_to_me);
|
free (iceConn->protosetup_to_me);
|
||||||
|
|
||||||
free ((char *) iceConn);
|
free (iceConn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,8 +48,7 @@ IceAddConnectionWatch (
|
|||||||
_IceWatchProc *newWatchProc;
|
_IceWatchProc *newWatchProc;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if ((newWatchProc = (_IceWatchProc *) malloc (
|
if ((newWatchProc = malloc (sizeof (_IceWatchProc))) == NULL)
|
||||||
sizeof (_IceWatchProc))) == NULL)
|
|
||||||
{
|
{
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@ -74,7 +73,7 @@ IceAddConnectionWatch (
|
|||||||
|
|
||||||
for (i = 0; i < _IceConnectionCount; i++)
|
for (i = 0; i < _IceConnectionCount; i++)
|
||||||
{
|
{
|
||||||
_IceWatchedConnection *newWatchedConn = (_IceWatchedConnection *)
|
_IceWatchedConnection *newWatchedConn =
|
||||||
malloc (sizeof (_IceWatchedConnection));
|
malloc (sizeof (_IceWatchedConnection));
|
||||||
|
|
||||||
newWatchedConn->iceConn = _IceConnectionObjs[i];
|
newWatchedConn->iceConn = _IceConnectionObjs[i];
|
||||||
@ -116,7 +115,7 @@ IceRemoveConnectionWatch (
|
|||||||
while (watchedConn)
|
while (watchedConn)
|
||||||
{
|
{
|
||||||
_IceWatchedConnection *nextWatchedConn = watchedConn->next;
|
_IceWatchedConnection *nextWatchedConn = watchedConn->next;
|
||||||
free ((char *) watchedConn);
|
free (watchedConn);
|
||||||
watchedConn = nextWatchedConn;
|
watchedConn = nextWatchedConn;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +124,7 @@ IceRemoveConnectionWatch (
|
|||||||
else
|
else
|
||||||
prevWatchProc->next = nextWatchProc;
|
prevWatchProc->next = nextWatchProc;
|
||||||
|
|
||||||
free ((char *) currWatchProc);
|
free (currWatchProc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,7 +139,7 @@ _IceConnectionOpened (
|
|||||||
|
|
||||||
while (watchProc)
|
while (watchProc)
|
||||||
{
|
{
|
||||||
_IceWatchedConnection *newWatchedConn = (_IceWatchedConnection *)
|
_IceWatchedConnection *newWatchedConn =
|
||||||
malloc (sizeof (_IceWatchedConnection));
|
malloc (sizeof (_IceWatchedConnection));
|
||||||
_IceWatchedConnection *watchedConn;
|
_IceWatchedConnection *watchedConn;
|
||||||
|
|
||||||
@ -193,7 +192,7 @@ _IceConnectionClosed (
|
|||||||
else
|
else
|
||||||
prev->next = watchedConn->next;
|
prev->next = watchedConn->next;
|
||||||
|
|
||||||
free ((char *) watchedConn);
|
free (watchedConn);
|
||||||
}
|
}
|
||||||
|
|
||||||
watchProc = watchProc->next;
|
watchProc = watchProc->next;
|
||||||
|
Loading…
Reference in New Issue
Block a user