Commit graph

95 commits

Author SHA1 Message Date
Alan Coopersmith
0e45f64766 Drop X_LOCALE fallback for OS'es without setlocale()
C89 or bust!   This was documented as being needed for "only Lynx,
Linux-libc5, OS/2" and has never been enabled in modular builds,
since none of those platforms have had anyone step up to add support
since the X11R7 conversion to autotools.

Mostly performed with unifdef -UX_LOCALE, followed by removal of files
left without any purpose, and manual cleanup of remaining references.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-22 22:02:17 -08:00
Alan Coopersmith
e9b14d10d0 Bug 68413 - [Bisected]Error in `xterm': realloc(): invalid next size
Pass *new* size to realloc, not old size.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-24 17:27:43 -07:00
Alan Coopersmith
bf3501e039 Remove unnecessary casts of pointers to (char *) in calls to Xfree()
Left one cast behind that is necessary to change from const char *
to char * in src/xlibi18n/lcCharSet.c.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-20 12:51:09 -07:00
Alan Coopersmith
25a7a329de Remove even more casts of return values from Xmalloc/Xrealloc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-20 12:51:09 -07:00
Alan Coopersmith
e7d46c6452 i18n modules: Fix some const cast warnings
imRm.c: In function '_XimSetICMode':
imRm.c:2419:37: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
imRm.c:2420:30: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]

lcGenConv.c: In function 'byteM_parse_codeset':
lcGenConv.c:345:13: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-20 12:51:09 -07:00
Alan Coopersmith
453c4ee436 Avoid memory leak/corruption if realloc fails in imLcPrs.c:parseline()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-20 12:51:04 -07:00
Alan Coopersmith
88a27a2aa9 ximcp/imRm.c: convert sprintf calls to snprintf
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2013-08-20 12:50:40 -07:00
ISHIKAWA,chiaki
8f58e54a5f Fix bogus timestamp generated by XIM
Fix bogus timestamp generted by XIM due to uninitialized
data field. Also set appropriate serial, too.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=39367

Signed-off-by: Chiaki ISHIKAWA <ishikawa@yk.rim.or.jp>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-07 08:32:19 -07:00
Egbert Eich
e7fd6f0eda XIM: Fix sync problem on focus change.
XSetICFocus() and XUnsetICFocus() are both asynchronous events.
This is a pretty stupid idea: those functions may undo certain
settings on the client side for which requests from the server
may still be in the queue unprocessed. Thus things may be set
in the wrong order ie instead of set -> unest it will be unset -> set.
Moreover there is no way for either the client or the server to
cause the event queue to be flushed - which is pretty bad as
XIM is bidirectional.
The scenario is as follows:
Two ICs are created:
        ic1 = XCreateIC(im,
            XNInputStyle, XIMPreeditCallbacks | XIMStatusCallbacks,
            XNClientWindow, window,
            XNPreeditAttributes, preedit_attr,
            XNStatusAttributes, status_attr,
            NULL);
        ic2 = XCreateIC(im, XNInputStyle,
                       XIMPreeditNothing | XIMStatusNothing,
                       XNClientWindow, window, NULL);
Then the focus is removed from ic2:
        XUnsetICFocus(ic2);
If SCIM is used as the input server it will send a bunch of requests
following an XCreateIC(). One of the requests registers a key release
filter. XUnsetICFocus() unsets both key press and release filters.
Since it is asynchronous, the input server requests to register key
press and release filters may not have been processed, when XUnsetICFocus()
is called. Since there is no explicite way for client programs to enforce
the request queue to be flushed explicitely before an X[Set/Unset]ICFocus()
call it would be safest to make those two calls synchronous in the sense
that they ensure the request queue has been handled before they execute.
The easiest way to do this from Xlib is thru a call to XGetICValues()
which sends a request to the server and subsequently reads the queue
from the server to the client. This will cause all outstanding requests
in the queue to be read and handled.
This is an ugly hack and this could be fixed directly in the client,
however it seems to be easier to fix Xlib than to fix numerous clients.
This problem arose since there is no well documented way how to handle
and synchronize XIM requests and not all input servers send requests
when an IC is created.
This has been discussed extensively in:
 https://bugzilla.novell.com/show_bug.cgi?id=221326

Signed-off-by: Egbert Eich <eich@freedesktop.org>
2013-08-07 16:12:35 +02:00
Egbert Eich
26ec7d3821 XIM: Fix race on focus change: set 'FABRICATED' only when keyev filters in place.
When synthesized key events are sent on commit XIM sets the 'fabricated'
flag so that the keypress handler knows that these were not real events.
This also happens when committing due to the loss of focus. However in this
case the keypress/release filters which consume and unset this flag are no
longer in the filter chain.
So the flag is erronously set when a real keyboard event is received after
focus has been regained. So the first event is wrongly treated as a
fabricated key in the keypress handler which will at the same time reset
the flag so the second key event is treated correctly.
This fix only sets the flag when at least one of the keyboard filters is in
place.
How to reproduce this bug: run scim, choose a Japanese input method start
two instances of xterm: start typing in one xterm (this should pop up an
IM window). Without comitting (hitting 'enter') move focus to the other
xterm, then move focus back. Start typing again. The first character will
be committed immediately without popping up an input window.
With this fix this behavior is gone.

See also: https://bugzilla.novell.com/show_bug.cgi?id=239698

Signed-off-by: Egbert Eich <eich@freedesktop.org>
2013-08-07 16:12:34 +02:00
Alan Coopersmith
164bf4dfe8 integer overflows in TransFileName() [CVE-2013-1981 9/13]
When trying to process file paths the tokens %H, %L, & %S are expanded
to $HOME, the standard compose file path & the xlocaledir path.
If enough of these tokens are repeated and values like $HOME are set to
very large values, the calculation of the total string size required to
hold the expanded path can overflow, resulting in allocating a smaller
string than the amount of data we'll write to it.

Simply restrict all of these values, and the total path size to PATH_MAX,
because really, that's all you should need for a filename path.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2013-05-09 18:59:52 -07:00
Alan Coopersmith
460e8a223b integer truncation in _XimParseStringFile() [CVE-2013-1981 8/13]
Called from _XimCreateDefaultTree() which uses getenv("XCOMPOSEFILE")
to specify filename.

If the size of off_t is larger than the size of unsigned long (as in
32-bit builds with large file flags), a file larger than 4 gigs could
have its size truncated, leading to data from that file being written
past the end of the undersized buffer allocated for it.

While configure.ac does not use AC_SYS_LARGEFILE to set large file mode,
builders may have added the large file compilation flags to CFLAGS on
their own.

size is left limited to an int, because if your Xim file is
larger than 2gb, you're doing it wrong.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2013-05-09 18:59:52 -07:00
Alan Coopersmith
226622349a Unbounded recursion in _XimParseStringFile() when parsing include files [CVE-2013-2004 2/2]
parseline() can call _XimParseStringFile() which can call parseline()
which can call _XimParseStringFile() which can call parseline() ....
eventually causing recursive stack overflow and crash.

Limit is set to a include depth of 100 files, which should be enough
for all known use cases, but could be adjusted later if necessary.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2013-05-09 18:59:52 -07:00
Alan Coopersmith
b9ba832401 unvalidated length in _XimXGetReadData() [CVE-2013-1997 12/15]
Check the provided buffer size against the amount of data we're going to
write into it, not against the reported length from the ClientMessage.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2013-05-09 18:59:52 -07:00
Alan Coopersmith
3cd974b1d4 Remove unused DECnet ("DNETCONN") code from Xlib
Has never been converted to build in modular builds, so has been unusable
since X11R7.0 release in 2005.  DNETCONN support was removed from xtrans
back in 2008.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-09 20:50:32 -08:00
Alan Coopersmith
a6e5b36a3e Remove unused TLI ("STREAMSCONN") code from Xlib
Has never been converted to build in modular builds, so has been unusable
since X11R7.0 release in 2005.  All known platforms with TLI/XTI support
that X11R7 & later releases run on also have (and mostly prefer) BSD
socket support for their networking API.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-09 20:50:32 -08:00
Yaakov Selkowitz
d14b6a250f XIM: remove Private and Public macros
Private is a struct member name in mingw-w64 <winioctl.h>, causing this
useless define in a private header to break the build.

Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2012-10-29 18:43:35 -05:00
Andreas Wettstein
d3b3570592 XIM: Allow modifier releases in compose sequences (#26705)
Currently, only non-modifier keys (actually, keysyms) can be part of a compose
sequence, and they are matched against the defined compose sequences at the
time the key is pressed.  The patch allows to use modifier keys an well, but
matches them on key release, and only if no other key has been pressed after
the modifier.

Releasing a non-matched modifier during an ongoing compose sequence only aborts
the sequence if any modifier release would have matched.  In particular, if no
compose sequences with modifiers are specified, the compose mechanism works
exactly as without this patch.

Even if modifiers are part of a compose sequence, they are not filtered.  This
is because modifiers affect the keyboard state no matter what we do here and,
therefore, filtering them only could confuse clients.

The purpose is this extension to the compose mechanism is to allow to make
better use of keys in convenient reach for touch typing.

Signed-off-by: Andreas Wettstein <wettstein509@solnet.ch>
Signed-off-by: James Cloos <cloos@jhcloos.com>
2011-12-11 16:56:06 -05:00
Choe Hwanjin
738f7b8673 XIM: Make Xim handle NEED_SYNC_REPLY flag
NEED_SYNC_REPLY flag should be in Xim not in Xic.
Because the focused Xic can be changed before sending sync reply.
After focused Xic changed, the new Xic doesn't have NEED_SYNC_REPLY
flag enabled, so libX11 doesn't send XIM_SYNC_REPLY packet.

This patch adds sync reply flag to Xim and removes sync reply
from Xic.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=7869

Signed-off-by: Choe Hwanjin <choe.hwanjin@gmail.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-14 17:19:15 -07:00
Yann Droneaud
b5a1086243 Return name instead of False in XSetICValues()
In case of error, XSetICValues() must return the first argument
that failed to be set.

But in some error paths, it returns False, which is converted to NULL,
so the function returns OK in case of error.

Signed-off-by: Yann Droneaud <yann@droneaud.fr>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-11 09:58:35 -07:00
Yann Droneaud
10992cb8dc Return name instead of value in XGetIMValues() and XSetIMValues()
As stated in man page (XOpenIM) and Xlib documentation (chapter 13.5.3),
XGetIMValues() and XSetImValues() "returns the name of the first argument
that could not be obtained."

But currently,

  err = XGetIMValues(im, "invalid", &arg, NULL);

returns &arg instead of "invalid".

This patch fixes https://bugs.freedesktop.org/show_bug.cgi?id=12897

Signed-off-by: Yann Droneaud <yann@droneaud.fr>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-11 09:56:54 -07:00
Jeremy Huddleston
913603660c Fix potential uninitialized variable access in _XimMakeICAttrIDList
Found by clang static analysis

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-09 02:27:59 -07:00
Alan Coopersmith
b850adbdeb Convert malloc(strlen()); strcpy() sets to strdup
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-18 17:49:18 -07:00
Alan Coopersmith
09194042d3 Replace Xmalloc+bzero pairs with Xcalloc calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-18 17:49:13 -07:00
Ander Conselvan de Oliveira
4b2e8d00f5 Fix memory leaks on _XimCbDispatch error path.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
46e6c78b1a Fix memory leak on _XimCommitRecv error path.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
0ace642a2d Fix memory leaks on _XimWriteCachedDefaultTree error paths.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
e29be94edb Fix memory leaks on _XimGetAttributeID error paths.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
d144a50512 Fix memory leaks on _XimProtoCreateIC error paths.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Ander Conselvan de Oliveira
6a452f7a98 Fix leaks in _XimEncodingNegotiation error paths.
name_ptr and detail_ptr weren't free'd in some cases before returning
False.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-13 11:05:59 +03:00
Alan Coopersmith
c1c91e9a22 Fix "attrinute" typo in comments in ximcp
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-04-12 20:50:42 -07:00
Erkki Seppälä
b993d73bb3 im/ximcp: release modifiermap before returning
Variable "map" goes out of scope

Release modifiermap before returning. Reordered code to call
XGetModifierMapping after the first return from the function.

Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
2011-03-11 12:38:08 +02:00
Samuel Thibault
40812b53ff Make the Local XIM request key releases for braille
Braille chords management needs key release events. We need to explicitly
request then, else GTK would not pass them throught XFilterEvent and braille
wouldn't work.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2011-02-21 21:54:17 +01:00
Samuel Thibault
c97c42c49c Match braille patterns with compose tree
Braille patterns should also be usable in Compose.  This combines the
implementation of braille chords and compose tree: only emit the braille
pattern if it can not be found in the compose tree, if any.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2011-02-21 17:27:38 +01:00
Samuel Thibault
0c6ca565d7 Fix status reporting for braille patterns
_XimLocalMbLookupString can return a braille keysym even if _Xlcwctomb can't
convert to the current MB charset.
_XimLocalUtf8LookupString needs to set the braille keysym and status too.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2011-02-21 15:56:54 +01:00
Alan Coopersmith
6ac417cea1 ximcp: Prevent memory leak & double free if multiple %L in string
In the highly unlikely event that TransFileName was passed a path
containing multiple %L entries, for each entry it would call
_XlcFileName, leaking the previous results, and then for each entry it
would copy from that pointer and free it, resulting in invalid pointers
& possible double frees for each use after the first one freed it.

Error: Use after free (CWE 416)
   Use after free of pointer 'lcCompose'
        at line 358 of modules/im/ximcp/imLcPrs.c in function 'TransFileName'.
          Previously freed at line 360 with free.
Error: Use after free (CWE 416)
   Use after free of pointer 'lcCompose'
        at line 359 of modules/im/ximcp/imLcPrs.c in function 'TransFileName'.
          Previously freed at line 360 with free.
Error: Double free (CWE 415)
   Double free of pointer 'lcCompose'
        at line 360 of modules/im/ximcp/imLcPrs.c in function 'TransFileName'.
          Previously freed at line 360 with free.

[ This bug was found by the Parfait 0.3.6 bug checking tool.
  For more information see http://labs.oracle.com/projects/parfait/ ]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-11 14:42:37 -08:00
Erkki Seppälä
1346b9ea3b ximcp/imLckup: Handle negative return value from _Xlcwctomb
Fixed by negative value to memcpy by checking for the negative return
value of _Xlcwctomb and returning 0/XLookupNone in that case.

a negative value was passed to memcpy

Unfortunately the other return values for *status don't fit into the
error (which appears to indicate some internal error or running out of
memory). The other valid status codes are XBufferOverflow,
XLookupNone, XLookupChars, XLookupKeySym, and XLookupBoth. Each of
these has a specific meaning attached.

Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:46:58 -08:00
Erkki Seppälä
79a5c86e02 ximcp/imTrX: Handle failing XGetWindowProperty
Checked return value of XGetWindowProperty and return false if it fails.

Return value of "XGetWindowProperty(im->core.display, spec->lib_connect_wid, prop, 0L, (length + bytes_after_ret + 3UL) / 4UL, 1, 0UL, &type_ret, &format_ret, &nitems, &bytes_after_ret, &prop_ret)" is not checked

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:46:51 -08:00
Erkki Seppälä
d695f5da9f ximcp/imRm: Handle leaking colormap_ret
Fixed memory leak by adding Xfree for colormap_ret

Variable "colormap_ret" goes out of scope

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:45:53 -08:00
Erkki Seppälä
f9eda19d08 ximcp/imRmAttr: Handle leaking missing_list
Fixed memory leak by adding Xfree and initializing missing_list with NULL

Variable "missing_list" goes out of scope

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:45:45 -08:00
Erkki Seppälä
3183269e09 ximcp/imRmAttr: Handle leaking colormap_ret
XFree colormap_ret and initialize it when appropriate.

Variable "colormap_ret" goes out of scope

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-02-01 23:45:40 -08:00
Alan Coopersmith
b15b8a558e Sun's copyrights are now owned by Oracle
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-09-03 23:11:53 -07:00
Fernando Carrijo
6de368c9aa Purge macros NEED_EVENTS and NEED_REPLIES
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2010-07-07 15:12:34 -07:00
Josh Triplett
15e5eaf628 Remove support for building without XCB
And there was much rejoicing.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>

Consensus on #xorg-devel agrees with removing --without-xcb; in
particular, acks from Adam Jackson, Daniel Stone, Kristian Høgsberg,
Julien Cristau, and Rémi Cardona.
2010-06-03 22:19:14 -07:00
Jeremy Huddleston
d232b259c3 Fix various build warnings
imLcIm.c: In function '_XimCachedFileName':
imLcIm.c:361: warning: format '%03x' expects type 'unsigned int', but argument 8 has type 'long unsigned int'
imLcIm.c:364: warning: format '%03x' expects type 'unsigned int', but argument 8 has type 'long unsigned int'

imRm.c: In function '_XimDefaultArea':
imRm.c:597: warning: cast from pointer to integer of different size
imRm.c: In function '_XimDefaultColormap':
imRm.c:626: warning: cast from pointer to integer of different size

lcFile.c:224: warning: no previous prototype for 'xlocaledir'

lcUTF8.c: In function 'iconv_cstombs':
lcUTF8.c:1841: warning: assignment discards qualifiers from pointer target type
lcUTF8.c:1869: warning: pointer targets in passing argument 1 of 'wctomb' differ in signedness
lcUTF8.c:1873: warning: pointer targets in passing argument 1 of 'wctomb' differ in signedness
lcUTF8.c: In function 'iconv_mbstocs':
lcUTF8.c:1935: warning: pointer targets in passing argument 2 of 'mbtowc' differ in signedness
lcUTF8.c: In function 'iconv_mbtocs':
lcUTF8.c:2031: warning: pointer targets in passing argument 2 of 'mbtowc' differ in signedness
lcUTF8.c: In function 'iconv_mbstostr':
lcUTF8.c:2121: warning: pointer targets in passing argument 2 of 'mbtowc' differ in signedness
lcUTF8.c: In function 'iconv_strtombs':
lcUTF8.c:2180: warning: pointer targets in passing argument 1 of 'wctomb' differ in signedness
lcUTF8.c: In function '_XlcAddGB18030LocaleConverters':
lcUTF8.c:2367: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2368: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2373: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2374: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2375: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2376: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type
lcUTF8.c:2377: warning: passing argument 5 of '_XlcSetConverter' from incompatible pointer type

XlibInt.c: In function '_XGetHostname':
XlibInt.c:3441: warning: implicit declaration of function 'gethostname'
XlibInt.c:3441: warning: nested extern declaration of 'gethostname'

ConnDis.c: In function '_XDisconnectDisplay':
ConnDis.c:540: warning: old-style function definition
ConnDis.c: In function '_XSendClientPrefix':
ConnDis.c:554: warning: old-style function definition
ConnDis.c: In function 'XSetAuthorization':
ConnDis.c:677: warning: old-style function definition

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2010-04-23 15:52:51 -07:00
Gaetan Nadon
b5797597f8 config: move CWARNFLAGS from configure.ac to Makefile.am
Compiler warning flags should be explicitly set in the makefile
rather than being merged with other packages compiler flags.

Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-02-19 09:22:56 -05:00
Alan Coopersmith
ddb1786720 Purge CVS/RCS id tags
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-14 17:38:26 -08:00
Alan Coopersmith
c1db9ddcfa Update Sun license notices to current X.Org standard form
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-14 15:39:14 -08:00
James Cloos
9df349a789 Allow inclusion of system level compose files.
With the release of XFree86 4.4 an inclusion system of compose files was
added to Xlib to allow inclusion of the default compose file (with %L),
any compose files from user’s home directory (with %H), or a compose
file with a hard coded path¹. However, even today including system level
compose files is not possible in a platform independent manner although
the machinery for including compose files and overriding previously
defined compositions is already in place.

With the ability to include system level compose files one could greatly
reduce the need for compose file rule duplication and the work needed to
propagate changes in one compose file to others. For example, currently
the Finnish compose file fi_FI.UTF-8 weights over 5000 lines² but it
is almost identical with en_US.UTF-8 except for perhaps half a dozen
compositions.

This commit allows one to include system level compose files with the
following kind of syntax:

include "%S/en_US.UTF-8/Compose"

1] http://www.xfree86.org/4.4.0/RELNOTES5.html#42
2] http://cgit.freedesktop.org/xorg/lib/libX11/tree/nls/fi_FI.UTF-8/Compose.pre

Signed-off-by: Marko Myllynen <myllynen@redhat.com>
Signed-off-by: James Cloos <cloos@jhcloos.com>
2010-01-13 11:04:38 -05:00
Jeremy Huddleston
3bb020587c Split CFLAGS into CPPFLAGS and CFLAGS
On some build systems, CPPFLAGS is set to "-I/some/prefix/include".  If older
X11 headers are in /some/prefix/include, they will be preferred over the
shipped headers.  This corrects that problem.
2009-10-01 22:20:38 -07:00