summaryrefslogtreecommitdiff
path: root/include/X11/Intrinsic.h
AgeCommit message (Collapse)Author
2024-02-11unifdef VMSAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-05-27issue #17: avoid _Static_assert from c++Thomas E. Dickey
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>
2021-06-27Use XtUIntPtr for integer types that can hold pointersAlex Richardson
Various Xt*Id types are integer types that are used to hold pointers. Use uintptr_t for standards-compliant conversion and to support architectures where long cannot hold pointers (e.g. CHERI). I found these by compiling libXt with the CHERI Clang compiler, as it warns about conversions from integer to pointer that do not use intptr_t. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
2021-06-27XtArgVal: Support architectures where 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. This commit changes XtArgVal to use intptr_t instead, which should be long on most architectures but is larger for CHERI. It also introduces XtIntPtr/XtUIntPtr which will be used in follow-up changes. This commit should also help on LLP64 ABIs where long is 32 bits but pointers are 64 bits. I am not sure what the compiler and C standard requirements are, so I've guarded the use of stdint.h with `#if __STDC_VERSION__ >= 199901L`. I've also added a _Static_assert() when compiling in C11 mode to statically verify that the XtArgVal type requirements are met. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
2019-05-29build- and compiler-warning fixes when XTTRACEMEMORY is definedThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-05-18use _X_NORETURN, works for gcc and clangThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-04-21The interface changes made recently have to be documented, and due to theThomas E. Dickey
time interval, etc., in turn requires an update to the specification version. Update that now.
2019-04-16change return-type to avoid const-mismatchesThomas E. Dickey
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-04-16Allow all of the "argv" strings to be writable, since those arrays mayThomas E. Dickey
be updated during initialization. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-04-16This is a minimal change which compiles when predefining _CONST_X_STRING,Thomas E. Dickey
by changing some function parameters and struct-members to _XtString (always "char*") from String (which may be "const char *"). There are still many compiler warnings; subsequent commits will reduce those. Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-04-15Referring to the xterm FAQThomas E. Dickey
https://invisible-island.net/xterm/xterm.faq.html#building_it I would like to add an optional feature which makes the String typedef "const" if _CONST_X_STRING is defined. Modifying the Intrinsic.h header is only a partial solution because the library has not been modified to take advantage of this (if it had, most of the const-warnings from gcc would go away). This change modifies the header file as well as the makestrs.c program which generates Shell.h and StringDefs.h so that they use String-casts rather than char*-casts (reducing the warnings seen when compiling with Xt's header files). Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2015-02-14unifdef -UCRAY -UCRAY2Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-01-12Add XtAsprintf() as a new exported APIAlan Coopersmith
Like asprintf() but using XtMalloc() to tie into the Xt memory allocation and error handling subsystems. Bumps libXt version to 1.0.99.1 so that modules can set their pkg-config dependency to libXt >= 1.0.99.1 to require XtAsprintf(). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-10-06Purge cvs tags.Jesse Adkins
Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2005-05-17gcc4 allows to check if sentinels are correct (a sentinel is theEgbert Eich
terminating element in a varargs list). A sentinel needs to be NULL, not 0 - which doesn't make a difference on 32bit but matters on 64bit. Furthermore it can be told that functions have a printf-like format string and argument list so that they can verify that both match. To use these features certain attributes need to be set - which are compiler specific. To do this we define macros which are expanded depending on the compiler version. For now we put those in include/Xfuncproto.h (the XFree86 DDX layer contains a file compiler.h which however is not visible outside the DDX) (Bugzilla #3268).
2005-02-21Convert lib/Xt to ANSI C (Thomas Dickey). Fixes for a few valgrind warningsXORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_1Matthieu Herrb
(Thomas Dickey).
2004-04-23Merging XORG-CURRENT into trunkXACE-SELINUX-MERGECOMPOSITEWRAPEgbert Eich
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich
2003-11-25XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folksxf86-4_3_99_902xf86-4_3_99_901xf86-4_3_99_16Kaleb Keithley
2003-11-14XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley
2003-11-14R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley