summaryrefslogtreecommitdiff
path: root/os
AgeCommit message (Collapse)AuthorFilesLines
2010-03-11os: remove INTERNAL_MALLOC define.Peter Hutterer1-3/+0
There doesn't seem to be anything that defines it and given that the counterpart (the X internal malloc) was removed in 01cfba75229f4b9bf1e4fe80814931acdacde14c it's unlikely to work anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-17os: Prevent core dump from being truncated.Rami Ylimaki1-2/+2
The problem fixed by this patch can be reproduced on Linux with the following steps. - Access NULL pointer intentionally in ProcessOtherEvent on key press. - Instead of saving core dump to a file, write it into a pipe. echo "|/usr/sbin/my-core-dumper" > /proc/sys/kernel/core_pattern - Dump the core by pressing a key. While the core is being dumped into the pipe, the smart schedule timer will cause a pending SIGALRM. Linux kernel stops writing data to the pipe when there are pending signals. This causes the core dump to be truncated. On my system I'm expecting a 6 MB dump but the size will be 60 kB instead. The problem is solved if we block the SIGALRM caused by expired smart schedule timer. I haven't been able to reproduce this problem in the following cases. - Save core dump to a file instead of a pipe. - kill -SEGV `pidof Xorg` - Press a key to dump core while gdb is attached to Xorg. - Give option -dumbSched to Xorg. Also note that the fix works only when NoTrapSignals has the default value FALSE. The problem can still be reproduced if error signals aren't trapped. In addition to pending SIGALRM, there is a similar problem with pending SIGIO from the keyboard driver during core dump. Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-17os: Introduce OsAbort for proper core dumps.Rami Ylimaki1-0/+12
Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-12Merge remote branch 'jturney/master'Keith Packard1-4/+0
2010-02-11Add xstrtokenize to the dix.Peter Hutterer1-0/+40
Move tokenize out of the parser, make it a dix util function instead. Splitting a string into multiple substrings is useful by other places, so let's use it across the line. Future users include config/hal, config/udev and of course the parser. Example usage: char **substrings = xstrtokenize(my_string, "\n"); Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-02-05Repair '-nolock'Jon TURNEY1-4/+0
commit 446fe9eecddd1337f9d5164dd7c301e1ba3dfe32 removes the AC_DEFINE for SERVER_LOCK and conditional compilation checking it, making it always on everywhere, except in os/utils.c where code is left under SERVER_LOCK, which now never gets built, making the '-nolock' option non-functional... This seems to have been broken since Xserver 1.7.0, but this option is actually of some slight use on cygwin, as if /tmp resides on a FAT filesystem (yes, I know...), hard links aren't supported. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2010-01-27xserver: Add timestamps to logfile output.Kok, Auke1-0/+9
Add timestamps in seconds derived from clock_monotonic to the log file. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-25Remove unbalanced ( from failure to move log errorAlan Coopersmith1-1/+1
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
2010-01-11os: state effect of -a and -t options more preciselySimon Thum1-2/+2
Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-16Merge remote branch 'alanc/master'Keith Packard1-1/+23
2009-12-16os: print log markers only if log level is >= 0Tiago Vignatti1-11/+11
FWIW default log verbosity is 0, so this will affect only if one start the server with a different -verbose argument. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-16Update Sun license notices to current X.Org standard formAlan Coopersmith1-1/+23
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-12-08Miscellaneous compilation warning fixesJeremy Huddleston1-2/+2
main.c:134: warning: no previous prototype for 'dix_main' rootlessScreen.c: In function 'RootlessMarkOverlappedWindows': rootlessScreen.c:434: warning: function declaration isn't a prototype backtrace.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int' backtrace.c:54: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int' set.c: In function 'RecordSetMemoryRequirements': set.c:413: warning: old-style function definition set.c: In function 'RecordCreateSet': set.c:425: warning: old-style function definition stub.c: In function ‘main’: stub.c:236: warning: ISO C90 forbids mixed declarations and code Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-11-11.gitignore: use common defaults with custom section #24239Gaetan Nadon1-0/+2
Using common defaults will reduce errors and maintenance. Only the very small or inexistent custom section need periodic maintenance when the structure of the component changes. Do not edit defaults. Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-09Avoid a null dereference if IFF_BROADCAST is set but there is no broadcast ↵Jon TURNEY1-1/+2
address It seems that the getifaddrs() function can return interfaces with IFF_BROADCAST & IFF_UP set, but no broadcast address (at least under Cygwin 1.7, this seems to happen for v6 mapped v4 addresses) Avoid a null dereference if this ever happens Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2009-11-05SHA1: Add support for Common CryptoJeremy Huddleston1-0/+28
libSystem on darwin can handle SHA1 computation without needing to pull in OpenSSL. See CC_crypto(3) Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
2009-11-02add libc as a choice for SHA1 implementationMatthieu Herrb1-1/+2
On Sun, Nov 01, 2009 at 02:54:13PM -0800, Keith Packard wrote: > Excerpts from Matthieu Herrb's message of Sun Nov 01 09:34:35 -0800 2009: > > > +AC_CHECK_FUNCS([SHA1Init], [HAVE_LIBC_SHA1=yes]) > > I'd suggest AC_CHECK_FUNC instead; as far as I can tell, AC_CHECK_FUNCS > will also define HAVE_SHA1INIT. Also, can you use HAVE_LIBC_SHA1 > consistently rather than having two separate names (HAVE_LIBC_SHA1 and > HAVE_SHA1_IN_LIBC)? Yes, I know one is a preprocessor symbol and the > other is a cpp shell variable, but I think that will work anyway. > New version taking you comments into account. From: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun, 1 Nov 2009 18:19:27 +0100 Subject: [PATCH] Add a probe for SHA1 functions in libc in *BSD. The interface is the same as the one in libmd. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-29Supply all code using dl*() with DLOPEN_LIBSMikhail Gusarov1-1/+1
Previously DLOPEN_LIBS was managed in top-level configure.ac. Instead bundle it with the code using dl*() functions to avoid breakages in uncommon configurations. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-28os: Add libsha1 as a choice of SHA1 implementationMikhail Gusarov1-0/+26
There are small systems which don't need OpenSSL or gcrypt. Add libsha1 (http://github.com/dottedmag/libsha1) as an alternative small SHA1 implementation. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-15Add libgcrypt as an option for SHA1Julien Cristau1-0/+39
Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Rémi Cardona <remi@gentoo.org>
2009-10-15Move SHA1 computation from render/glyph.c to os/Julien Cristau2-1/+77
Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Rémi Cardona <remi@gentoo.org>
2009-10-08Fix GCC warnings in xorg_backtraceJamey Sharp1-3/+3
Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-10-06Use $(AM_V_GEN) to silence more commands when AM_SILENT_RULES is activeAlan Coopersmith1-2/+2
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-06Add platform tests for Dtrace linker magicAlan Coopersmith1-3/+1
Replaces special handling for Xquartz DDX and scales better to handling the multiple platforms that now have some level of Dtrace support available. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2009-09-27Add (ok, fix) support for DTrace under OS XBen Byer1-0/+2
(cherry picked from commit 8428a57184f542941d2c8c90e97d18e111a69dd2)
2009-09-04os: silence bigreqsproto compiler warningPeter Hutterer1-1/+1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-04os: don't redefine GNU_SOURCEPeter Hutterer1-0/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-08-28os: remove unused -cursor optionTiago Vignatti1-5/+0
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-08-20linux: Yet more malloc() avoidance for backtrace()Adam Jackson1-0/+14
Turns out, there's an initializer at the top of backtrace() that (on some arches) calls dlopen(). dlopen(), unsurprisingly, calls malloc(). So, call backtrace() early in signal handler setup so we can later safely call it from the signal handler itself.
2009-08-19linux: hand-roll a backtrace printer instead of using backtrace_symbolsAdam Jackson1-7/+16
Why? Because backtrace_symbols calls malloc, which you can't do from a signal handler. Face? Palm.
2009-08-18xserver doesn't stop all connections to localhostJesse Adkins1-2/+1
X.Org Bugzilla #23329: http://bugs.freedesktop.org/show_bug.cgi?id=23329 Patch #28648: http://bugs.freedesktop.org/attachment.cgi?id=28648 I noticed in xserver at os/access.c that xorg tries to stop connections to localhost by checking against the address 127.0.0.1. However, RFC 3330 defines the localhost network as 127.0.0.0/8. This means that any IPv4 address that starts with 127 is just another name for localhost.
2009-08-03Bug 16832: XDMCP related build error when --disable-xdmcp is usedPaul Bender1-0/+6
X.Org Bugzilla #16832: http://bugs.freedesktop.org/show_bug.cgi?id=16832 Patch #27279: http://bugs.freedesktop.org/attachment.cgi?id=27279
2009-07-15Update to xextproto 7.0.99.1.Peter Hutterer1-2/+1
xextproto had Xlib client headers moved into libXext. Protocol header files are named fooproto.h, header files with constants foo.h or fooconst.h where foo.h was already in use for client-side headers.
2009-07-14os: switch to byte counting functionsPeter Hutterer2-5/+5
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-18Clarify use of and need for mffs vs. ffsAlan Coopersmith3-4/+6
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-06-11OS: Fix compile warningsDaniel Stone1-5/+7
It's a marvel the sigaction() ever actually worked. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-05-28Merge branch 'master' into xi2Peter Hutterer2-11/+22
Conflicts: Xext/geext.c Xi/chdevcur.c Xi/extgrbdev.c Xi/xiproperty.c configure.ac dix/ptrveloc.c hw/xfree86/common/xf86Config.c mi/mipointer.h test/input.c xkb/xkb.c
2009-05-22os: fix compiler warning "too few arguments to format"Peter Hutterer1-2/+2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-05-14Update several of my and/or Red Hat's licenses to standard form.Adam Jackson1-10/+11
2009-04-28Make the cursor completely optionalSimon Farnsworth1-1/+11
For embedded use, it's convenient to be able to disable the cursor completely, without having to audit and fix up all your third-party code (e.g. Mozilla Firefox). Add -nocursor and -cursor server options to enable and disable the cursor. The default is still -cursor, but embedded users can run the server with -nocursor to hide the cursor regardless of what application developers do. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-19os: don't malloc memory in LogVMessageVerb.Peter Hutterer1-16/+6
LogVWrite is limited to a buffer size of 1024, so we don't loose anything here by truncating. This way we can use LogVMessageVerb (and xf86Msg and friends) during signal handlers with the normal message types. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-14xdmcp: Don't crash on X -query with more than 255 IP addresses. (#20675)Adam Jackson1-0/+2
You could be more clever than this, but the wire protocol says this really is an array of not more than 255 ARRAY8, so it's not just a matter of changing the types.
2009-04-09Use RTLD_DI_SETSIGNAL to catch runtime dynamic loader errors and clean upAlan Coopersmith1-0/+20
Based on fix for Sun bug 6813925: Xorg needs to catch ld.so.1 failure so it can close down devices cleanly <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6813925> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-09Lift fatal signal handlers from DDX'es up to a common DIX implementationAlan Coopersmith2-0/+90
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-04-06os: signal handlers return void.Adam Jackson1-4/+2
2009-04-06Remove some OS/2 leftovers.Adam Jackson1-9/+0
2009-04-03os: Remove the useless -x optionAdam Jackson1-9/+0
2009-04-03DPMS: Simplify command line parsingAdam Jackson1-2/+1
2009-03-23Remove two unused defines in C filesTomas Carnecky1-1/+0
These two defines were defined in C files but not used anywhere: dix/window.c #define DeviceEventMasks (KeyPressMask | [...] os/connection.c #define MAXFD 500 Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-03-05Remove #ifdef macII code left over from ancient A/UX 3.0 supportAlan Coopersmith1-4/+0
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>