About Xalloc()/Xfree() function used in liblbxutil library.

Tadashi Koike t-koike at pop01.odn.ne.jp
Fri Sep 21 15:55:41 PDT 2007

>> After your suggestion, I continued to research into the way of
>> ridding liblbxutil library of dependence to Xalloc()/Xfree() which
>> is (probably) on libXdmcp.
> Given that lbx is no longer included in the X server, is there
> some reason you need liblbxutil at all?

Please refer my first contribution on Sat, 15 Sep 2007.
That is flollowing:

From: Tadashi Koike <t-koike at pop01.odn.ne.jp>
Subject: About Xalloc()/Xfree() function used in liblbxutil library.
To: xorg at lists.freedesktop.org
Message-ID: <46EAB853.7050200 at pop01.odn.ne.jp>
Content-Type: text/plain; charset=ISO-2022-JP

Hello everyone,

(I am weak in English, so please forgive the error of the English sentence)

I have a question about Xalloc() function used in liblbxutil library.

I am using Fedora 7 to build Xorg 7.3 tree.

On lib/liblbxutil/src/libx_zlib/lbx_zlib.c file, the Xalloc() is
used by ZlibInit() function, and Xfree() is used by ZlibFree().

Compiling liblbxutil library finished fine. but when I researched
<INST_DIR>/lib/liblbxutil.a , I could not find symbols of
Xalloc()/Xfree() functions in that library.

I tryed below:

   # cd <INST_DIR>/lib
   # nm liblbxutil.a | egrep 'X(alloc|free)'
       U Xalloc
       U Xfree
       U Xalloc
       U Xfree
       U Xalloc
       U Xfree

I found that these functions are declared in "lbx_zlib.h" with
extern declaration.

... Maybe I think that these functions are on libXdmcp.(a,so).

 >From the first, XFIXES Extention is related with xserver, so
there is no problem on compiling xserver (it requires libXdmcp),
I guess.

But I think when "Library and server implementations are separate"
(reference: lib/liblbxutil/README), that dependence should be
got rid of.

Other libraries use Xmalloc()/Xfree() that is defined in Xlibint.h .
I think that lbx_zlib.c should use the same function as other

Sorry I began to studying X Window System recently, so please
give me some lectures/ideas about that.

Sincerely yours,

  - Tadashi Koike, Japan

More information about the xorg mailing list