summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-08-02BSD MakefileobsdMatthieu Herrb
2024-05-23Improve linking with widget libraries on macOSHEADmasterMohamed Akram
This allows getting rid of the vendor shell hack in libXaw and libXaw3d by using a coalesced weak reference.
2024-02-11unifdef AIXSHLIB & SUNSHLIBAlan Coopersmith
AIXSHLIB was only set in the Imake configs for AIX versions < 5 SUNSHLIB was only set in the Imake configs for SunOS versions < 5 Neither has ever been set in the autoconf configs Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11unifdef __EMX__Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11unifdef VMSAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11unifdef USGAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11unifdef MOTOROLAAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11unifdef AIXV3Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11unifdef __osf__Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11unifdef hpuxAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11unifdef sgiAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2024-02-11unifdef ultrixAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-11-12quiet a couple of unused-parameter warningsThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2023-11-12eliminate an unnecessary castThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2023-11-12Add continue_to_dispatch parameter to _XtResourceConfigurationEH()Thomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2023-11-12remove substitution for EXEEXT_FOR_BUILD, not defined in automakeThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2023-11-12issue #20: c23 boolean conflictThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2023-09-18README.md: update & correct links to O'Reilly X Toolkit booksAlan Coopersmith
Fix volume 5 link to point to volume 5, not 4. Fix volume 4 3rd edition link to point to 3rd ed. not 2nd. Update links to drop "www." from hostname to avoid a redirect. Reported-by: consolers on #xorg-devel IRC Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-08-14issue #19: include <process.h> on Windows for getpid()Thomas E. Dickey
submitted by Billy O'Neal This problem was first detected in https://github.com/microsoft/vcpkg/pull/33088 Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2023-05-27issue #18: cross-build issue in utilThomas E. Dickey
Modify link rule for utils/makestrs to use $(CC_FOR_BUILD) directly, avoiding libtool flags added when cross-compiling the library. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2023-05-27issue #17: avoid _Static_assert from c++Thomas E. Dickey
2023-04-09libXt 1.3.0libXt-1.3.0Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-03-07Replace XtMalloc() calls with XtMallocArray()Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-03-07Replace XtRealloc() calls with XtReallocArray()Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-03-07Add XtReallocArray() for overflow checking of multiplied argsAlan Coopersmith
Uses reallocarray() if available, otherwise checks for overflow itself, if overflow is possible (i.e. in ILP32 & ILP64 environments, but not LP64 with 32-bit ints). Includes unit tests and XtMallocArray() helper macro. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-03-07test: Add unit tests for XtMalloc, XtCalloc, & XtReallocAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-03-04configure: Use LT_INIT from libtool 2 instead of deprecated AC_PROG_LIBTOOLAlan Coopersmith
AC_PROG_LIBTOOL was replaced by LT_INIT in libtool 2 in 2008, so it's time to rely on it. Clears autoconf warnings: configure.ac:36: warning: The macro `AC_PROG_LIBTOOL' is obsolete. configure.ac:36: You should run autoupdate. m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from... configure.ac:36: the top level Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-25Remove "All rights reserved" from Oracle copyright noticesAlan Coopersmith
Oracle no longer includes this term in our copyright & license notices. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09TMstate.c: Handle -Wduplicated-branches warningsAlan Coopersmith
Gets rid of these messages from gcc: TMstate.c: In function ‘GetBranchHead’: TMstate.c:128:12: warning: this condition has identical branches [-Wduplicated-branches] if (parseTree->branchHeadTblSize == 0) ^ TMstate.c: In function ‘_XtGetQuarkIndex’: TMstate.c:183:16: warning: this condition has identical branches [-Wduplicated-branches] if (parseTree->quarkTblSize == 0) ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-09Add xfilesearchpath to xt.pcAlan Coopersmith
Make setting of --with-xfile-search-path available to other components, without having to link with libXt. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-06configure.ac: Replace HAVE_LIBRARY with AC_CHECK_LIBAlan Coopersmith
AC_CHECK_LIB was introduced in autoconf 2.0 (1994) to replace HAVE_LIBRARY Clears autoconf warnings of: configure.ac:108: warning: The macro `AC_HAVE_LIBRARY' is obsolete. configure.ac:108: You should run autoupdate. ./lib/autoconf/libs.m4:138: AC_HAVE_LIBRARY is expanded from... configure.ac:108: the top level Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-17tests: Replace g_assert() calls with g_assert_*() callsAlan Coopersmith
https://docs.gtk.org/glib/testing.html warns against using g_assert() in test cases, since it is a no-op when compiling with G_DISABLE_ASSERT. The replacement calls also give more detailed messages on failures. Raises the minimum required glib version for building unit tests from 2.16 (released March 2008) to 2.40 (released March 2014) to get support for g_assert_nonnull(). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-17tests: Use XORG_MEMORY_CHECK_FLAGS from xorg-macros 1.16Alan Coopersmith
Replaces previous local copy which had gotten out of date. Raises xorg-macros minimum version from 1.13 (released March 2011) to 1.16 (Dec. 2011). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-12-17tests: update g_test_bug_base url from bugzilla to gitlabAlan Coopersmith
Also adds a call to g_test_bug() for the one existing testcase associated with a bug in a public bug tracker. Otherwise this is mostly a placeholder for now, as no other tests call g_test_bug() yet to report what bugs they test for. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-08-11Use memcpy() instead of XtMemmove() when buffers are known to differAlan Coopersmith
Most of these came from a mass XtBCopy() -> XtMemmove() substitution in 1993 with a commit comment of "ANSIfication". But include/X11/IntrinsicI.h now defines XtMemmmove() as just calling memcpy() as long as src & dst differ, so remove an unnecessary check when we've just allocated a buffer, and reduce the chance that someone thinks we'll actually call memmove() instead of memcpy() Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-08-11Use memcpy() instead of memmove() when buffers are known not to overlapAlan Coopersmith
Most of these came from a mass bcopy() -> memmove() substitution in 1993 with a commit comment of "ANSIfication". Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-17gitlab CI: stop requiring Signed-off-by in commitsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-17Fix spelling/wording issuesAlan Coopersmith
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-17Build xz tarballs instead of bzip2Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-06-20update copyright-dateThomas E. Dickey
2022-06-20Support buttons > 5 in translation tables [v2]Keith Packard
Add support for arbitrary button numbers by replacing the table-driven detail parsing for BtnDown/ButtonPress and BtnUp/ButtonRelease with a custom parser that allows for an arbitrary button number (1-255) after the 'Button' prefix. Document what this syntax looks like in the table of detail information. Signed-off-by: Keith Packard <keithp@keithp.com>
2022-06-18cppcheck (revise IsDescendant() to fix possible null-dereference)Thomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-18cppcheck fixes (const, null dereferencing, uninitialized, scope)Thomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-18fixes for gcc13 warningsThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-18cppcheck and clang --analyze fixesThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-14codespell-fixesThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2022-06-14add _X_NORETURN to agree with header-fileThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2021-12-02gitlab CI: add a basic build testAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-06-27Fix InternalCallbackRec layout if pointers are bigger than 64 bitsAlex Richardson
When running `xeyes` via `SSH -X` on CHERI-RISC-V FreeBSD, I was getting a Bus Error (unaligned store) in the `cl->callback = callback;` line of _XtAddCallback. The `cl` variable (created using `ToList(icl)`) was only aligned to 8 bytes, but for CHERI-RISC-V pointer-type loads and stores require 16-byte alignment. In order to fix this, I added a C99 flexible array member to internalCallbackRec when compiling for C99 or newer. This ensures that sizeof(InternalCallbackRec) is 16 (since it now includes the required 12 byte padding up to the first XtCallbackRec). This also ensures that alignof(InternalCallbackRec) is 16, but that doesn't matter in this case since malloc() will always return a sufficiently-aligned pointer. I also changed ToList(p) to use the flexible array member directly when compiling for C99. This is not a functional change since it will evaluate to the same pointer, but it does add additional type checking and ensures that only a `InternalCallbackRec *` can be passed to the macro. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
2021-06-27Fix XrmResource layout if pointers are bigger than longAlex Richardson
On CHERI-enabled architectures (e.g. Arm's Morello), pointers are twice the size of addresses (i.e. 128 bits for Morello, 64 bits for 32-bit RISC-V). However, XtArgVal is currently defined as long, so it cannot be used to store pointers on these architectures. Also add a _Static_assert() when compiling with C11 support to check that the offset of the last member matches that of XtResource. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>