Linux-Development-Sys Digest #911, Volume #6 Wed, 30 Jun 99 07:13:59 EDT
Contents:
Re: Why not C++ (Cameron Hutchison)
Time-based events screwed up in X (not reliable) ("Eric Livingston")
Re: makedev (Paul Kimoto)
Re: Compilation errors with 2.2.10 (Paul Kimoto)
Re: Why not C++ (Josh Stern)
Re: Sleeping or not? ("B. James Phillippe")
Re: Where to find IOSTAT and SAR kernel patch? ("Michael Faurot")
Problems creating tiny, statically linked application (Mats Liljegren)
Re: binutils compile error (Vic Mulyk)
LinuxThreads problem about graphic library ("Cligon")
Re: Why we are still holding on to X Windows (Aurel Balmosan)
problem with sendmail (lello)
Re: Why not C++ (Martin Aupperle)
gcc library function reference. ("Kim,Taesung")
Re: Another Windows developer looking for a good IDE (Boudewijn Rempt)
Re: Why not C++ (Nathan Myers)
Re: serial driver problem (Josef =?iso-8859-1?Q?M=F6llers?=)
----------------------------------------------------------------------------
From: Cameron Hutchison <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Why not C++
Date: 29 Jun 1999 23:27:34 GMT
[EMAIL PROTECTED] (John E. Davis) writes:
>On Sat, 26 Jun 1999 11:53:08 +1200, Bruce Hoult <[EMAIL PROTECTED]>
>wrote:
>> some_function(&foo);
>>
>>What will be foo's value after the call to some_function? Will it be
>>altered? In C he has no way of knowing because C programmers often pass
>>structs by reference even when they don't intend to change them.
>At least the syntax indicates whether or not foo could be altered.
>The fact remains that one cannot look at
>
> some_function (x)
>in C++ and be sure that x was not modified, whereas in C you know that
>the local variable x will not be affected.
In C you still dont know that x will be unaffected.
Consider this:
#define inc(x) (++(x))
...
int x = 1;
...
inc(x);
In this case, x is being modified and you cannot tell from the context. It
may be bad form to write a macro with lower case letters, but it can also
be argued that it is bad form to use non-const references in C++.
--
Cameron Hutchison ([EMAIL PROTECTED]) | Onward To Mars
GCS d--@ -p+ c++(++++) l++ u+ e+ m+(-) s n- h++ f? !g w+ t r+
------------------------------
From: "Eric Livingston" <[EMAIL PROTECTED]>
Crossposted-To:
linux.redhat.devel,linux.redhat.development,redhat.config,redhat.general,redhat.kernel.general
Subject: Time-based events screwed up in X (not reliable)
Date: Tue, 29 Jun 1999 21:50:29 -0400
I'm running RH6.0 w/2.2.10, tested both with and without rtc compiled in.
All on a Thinkpad 755c notebook.
Console-based realtime programs (top, etc) update correctly and reliably,
and seem to work great.
However, in XFree86, programs such as gpppkill and gstripchart run for a
couple of seconds and/or update iterations, then simply stop. If I move the
mouse over their windows and right-click a context menu or something, they
will tend to update their displays once in response to the mouse event, but
then become idle again.
The behaviour is consistent with them no longer receiving timer-based events
(their code has generic event handlers that respond to mouse and timer
events and update via either, so it's understandable that the mouse event
would trigger an update).
I've also had related issues, such as the screen blanking/screensaver
initializing every couple of seconds, only held at bay with continuous mouse
movement (finally had to turn off blanking/saving altogether), and focus
switching windows extremely slowly (like 30 seconds or so) on an unloaded
CPU.
Any ideas? Right now my X windows environment is pretty screwed up without
reliable timer events...
Eric
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Subject: Re: makedev
Date: 29 Jun 1999 22:50:59 -0500
Reply-To: [EMAIL PROTECTED]
In article <Pine.SOL.3.96.990629201134.3472A-100000@giaspna>,
Ashutosh S. Rajekar wrote:
> Can anyone tell me what makedev actually does ? It is supposed to
> make the /dev entries. What is the actual format of the /dev entry, and
> what are the parameters passed to it. How does it depend on the kernel
> which is running when the makedev command is run ? How does the kernel
> process the /dev entries after the makedev command has been run ? What
> translation is required ?
Run "ls -l /dev", which should present the information encapsulated
in each entry: the permissions, owners, whether it's a block or
character device, and the major and minor numbers.
On most systems, "makedev" is essentially a shell script that calls
"mknod" with the appropriate parameters. (See the fileutils info pages
for documentation on "mknod".)
--
Paul Kimoto <[EMAIL PROTECTED]>
------------------------------
From: [EMAIL PROTECTED] (Paul Kimoto)
Crossposted-To: comp.os.linux.misc
Subject: Re: Compilation errors with 2.2.10
Date: 29 Jun 1999 22:53:10 -0500
Reply-To: [EMAIL PROTECTED]
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> checksum.c:200: redefinition of `csum_partial_copy'
> checksum.c:105: `csum_partial_copy' previously defined here
> {standard input}: Assembler messages:
> {standard input}:185: Fatal error: Symbol csum_partial_copy already defined.
There is no (ix86) checksum.c file in the 2.2 kernel series. It must
be left over from some old kernel source. Delete it.
--
Paul Kimoto <[EMAIL PROTECTED]>
------------------------------
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Why not C++
From: [EMAIL PROTECTED] (Josh Stern)
Date: Wed, 30 Jun 1999 03:15:25 GMT
Greg Comeau <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] writes:
>>If I'm using a C library, my program might have to say:
>>some_function( &x );
>>
>>so, when debugging, I know right there that I can't assume x won't be
>>altered. The same thing in C++ would be:
>>
>>some_function( x );
>>
>>but I don't know whether I'm passing by value or by reference or const
>>by reference. I have to go and find the header, then look through it to
>>find the prototype for that function. It would be useful if there were a
>>syntax difference.
>The above is flawed, because in both examples you need to go and find
>the header, and in both examples you then need to look through it to find
>the prototype for that function, so the above is a misguided argument.
>In both examples it would be useful if there were a syntax difference.
>Neither (x) nor (&x) is sufficient in either C or C++ from this perspective.
>It's more that a development time issue. Anyway, it's doubtful anything
>about it is changing, so we'll need to settle on good support tools to help
>out with this, and more.
How about if we just ask the programmer to use some common sense
and call the non-const version of the function
void
getSomethingsValue(T& x) ?
Then if you see
getSomethingsValue(x);
in a function definition, it is pretty obvious that it is not being
called to return a value, and the function name is a very strong
hint that it is not being called to set another value.
- Josh
------------------------------
From: "B. James Phillippe" <[EMAIL PROTECTED]>
Subject: Re: Sleeping or not?
Date: 30 Jun 1999 05:37:05 GMT
On 29 Jun 1999, ellis wrote:
> In article <[EMAIL PROTECTED]>,
> herman <[EMAIL PROTECTED]> wrote:
>
> >I'm working on a driver and need to know at the Interrrup Service
> >Routine (ISR) if the "read" call is sleeping or not.
...
> >The ISR routine wants to know if "read" is blocked and sleeping, waiting
> >for more data. How can ISR tell this condition? Would
> >current->blocked work at the ISR level?
That won't work because current is the idle task when
in_interrupt()/intr_count != 0.
> >Should I just use a variable like a flag?
>
> Keeping a flag is a way to do it.
Right. One common way is to use something like an atomic bit or integer
operation for both the ISR and the user-context code/system call so they
don't race for flag access.
-bp
--
# bryan at terran dot org
# http://www.terran.org/~bryan
------------------------------
From: "Michael Faurot" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: Where to find IOSTAT and SAR kernel patch?
Date: 30 Jun 1999 05:02:42 GMT
In comp.os.linux.development.system Gopal Santhanam <[EMAIL PROTECTED]>
wrote:
: Hi,
: The subject says it all. I'm looking for iostat and the SAR kernel
: patch for Linux. I've only see reference to these two at the _Linux
: Performance Tuning_ website, http://www.nl.linux.org/linuxperf/.
: Any help would be appreciated.
Although this doesn't answer your question, you might want to look at
atsar. It was announced about two weeks ago in c.o.l.a. I've no idea
if it's any good or not, but it looks to be a clone of SAR.
You can get a copy here:
ftp://ftp.atcomputing.nl/pub/tools/linux/atsar_linux-1.4.tar.gz
--
==============================================================================
Michael | mfaurot | Wedding is destiny, and hanging likewise.
Faurot | atww.org | -- John Heywood
------------------------------
From: Mats Liljegren <[EMAIL PROTECTED]>
Crossposted-To: gnu.gcc.help
Subject: Problems creating tiny, statically linked application
Date: Wed, 30 Jun 1999 09:07:44 +0200
I want to create a very small (preferably ~20KB) statically linked
application, which is used during boot sequence. This application will
be on a minimal distribution of a Linux system.
When I linked my application with -static and -s parameters, the size
was around 120KB. Of those, my application consists of around 20KB, and
uses exit(), malloc() and free(). Of those, I can do without malloc()
and free() with a little re-design.
But somehow, I doubt that the code for exit(), malloc() and free() is
100KB big! So I made a map file to see what happens. Well, the entry and
exit code needs the hole file library (which I don't use) and also
printf() with all the things that takes with it!!
I looked at the sources for the library (glibc-2.1.1pre3) and tried to
see if I could do my own version, with just the entry and exit code. But
I don't understand the code.
As for entry code, it seems to be like this:
ctr0.o -> _start (/sysdeps/i386/elf/start.S)
_start -> __libc_start_main (/sysdeps/generic/libc_start.c)
__libc_start_main -> __libc_init_first (/sysdeps/i386/init-first.c)
__libc_start_main -> (*init)()
__libc_start_main -> (*main)()
__libc_start_main -> exit()
exit() -> _cleanup()
exit() -> _exit()
As far as I can see, I could redefine __libc_start_main to make it skip
the call to __libc_init_first, as I do not have any use of argc, argv or
argp. So far so good.
But I cannot find _exit()!! I'm running on a elf i386 Linux platform,
and there seems to be _exit() defined for all other platforms except
i386...
So my questions are:
1) Is there something bad about skipping __libc_init_first in my case?
2) Where is i386 version of _exit()?
Thanks in advance for any help!
/Mats
------------------------------
Date: Wed, 30 Jun 1999 01:50:40 -0400
From: Vic Mulyk <[EMAIL PROTECTED]>
Subject: Re: binutils compile error
Klaus Schneider wrote:
>
> Hi all,
>
> trying to compile and install binutils 2.9.1
> the compilation with �make� went ok, but when
> �make install� I got a strange error:
>
> ranlib: error in loading shared libraries
> : undefined symbol: __register_frame_info
>
> I looked at the things happening and noticed that
> the error was produced by the new runlib in
> binutils/.libs (although the wrapper script
> should set the LD_LIBRARY_PATH) ;
> trying to call
>
> binutils/.libs/ranlib manually also failed.
>
> What can I do?
> What does produce that error?
>
> Thanks for your help!
> Klaus
What does your configure line look like?
-vic
------------------------------
From: "Cligon" <[EMAIL PROTECTED]>
Subject: LinuxThreads problem about graphic library
Date: Wed, 30 Jun 1999 16:58:47 +0800
Dear all,
I recently used LinuxThreads to develope graphic application.
The graphic libraries I have used are svgalib-1.3.1 and lrmi.6.0 (Linux Real
Mode Interface).
Also, I followed the guide of FAQ of LinuxThreads to correct the signal
problem.
It seems that LinuxThreads can't cooperate with graphical library
correctly.
When two or more threads accessing the graphical function, and
I'm sure that appropriate MUTEX protection have been done.
Could anyone give me some suggestion?
Thank you very much.
JaoYen Wei
Email: [EMAIL PROTECTED]
------------------------------
Crossposted-To: comp.os.linux.advocacy,comp.os.linux.development.apps
From: Aurel Balmosan <[EMAIL PROTECTED]>
Subject: Re: Why we are still holding on to X Windows
Date: Wed, 30 Jun 1999 08:40:52 GMT
Hello all,
My guess about this discussion is that it was initiated by a TOLL.
Better leave the TROLL alone. 71 (no 72 including mine) useless
articels are enough I think.
Bye,
Aurel.
--
================================================================
Aurel Balmosan | [EMAIL PROTECTED], [EMAIL PROTECTED]
http://gaia.owl.de/~aurel/ |
================================================================
------------------------------
From: lello <[EMAIL PROTECTED]>
Subject: problem with sendmail
Date: Wed, 30 Jun 1999 11:02:55 +0200
Hello, I have a problem with sendmail, I hope that someone can help me
(peaseee :-)))
Here it is: I hava compile the last version of sendmail (8.9.3) without
any flag, created sendmail.cf getting for the alias of the domain e of
the users
> # Virtual user table (maps incoming users)
> Kvirtuser dbm -o /etc/mail/virtusertable
>
> # Access list database (for spam stomping)
> Kaccess dbm -o /etc/mail/access
created the two databases with:
> /usr/sbin/makemap dbm virtualuser < virtualuser
> /usr/sbin/makemap dbm access < access
>
so far no problems following the instructions of the various README...
executing sendmail however I get the following error messages:
> 554 /etc/sendmail.cf: line 91: readcf: map virtuser: class dbm not
> available
> 554 /etc/sendmail.cf: line 94: readcf: map access: class dbm not
> available
>
so I tried to compile everything stating explicitly in
> Makefile.m4
> MAPDEF=-DNDBM
but in this case I cannot even link the *.o files:
> > Build -c
> Configuration: os=Linux, rel=2.0.34, rbase=2, rroot=2.0, arch=i586,
sfx=
> Clearing out existing obj.Linux.2.0.34.i586 tree
> Using M4=/usr/bin/m4
> Creating obj.Linux.2.0.34.i586 using ../BuildTools/OS/Linux
> Making dependencies in obj.Linux.2.0.34.i586
> cc -M -I. -DNDBM *.c >> Makefile
> Making in obj.Linux.2.0.34.i586
> cc -O -I. -DNDBM -c alias.c -o alias.o
> cc -O -I. -DNDBM -c arpadate.c -o arpadate.o
> cc -O -I. -DNDBM -c clock.c -o clock.o
> [...]
> cc -O -I. -DNDBM -c util.c -o util.o
> cc -O -I. -DNDBM -c version.c -o version.o
> cc -o sendmail alias.o arpadate.o clock.o collect.o conf.o control.o
> convtime.o daemon.o deliver.o domain.o envelope.o err.o headers.o
> macro.o main.o map.o mci.o mime.o parseaddr.o queue.o readcf.o
> recipient.o safefile.o savemail.o snprintf.o srvrsmtp.o stab.o stats.o
> sysexits.o trace.o udb.o usersmtp.o util.o version.o -ldb
> map.o: In function `ndbm_map_open':
> map.o(.text+0x11aa): undefined reference to `dbm_pagfno'
> make: *** [sendmail] Error 1
>
I use gcc version 2.7.2.3 and GNU ld version 2.9.1 (with BFD
2.9.1.0.19), but even on other machine with more up-to-date versions I
get the same results ;((((
I anyone can help me I would be very very grateful
bye
Marco Minotto
------------------------------
From: [EMAIL PROTECTED] (Martin Aupperle)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking,comp.lang.c++
Subject: Re: Why not C++
Date: Wed, 30 Jun 1999 09:11:00 GMT
On 28 Jun 1999 17:05:17 -0400, [EMAIL PROTECTED] (Greg Comeau) wrote:
>>
>>C++ *is* slower than C.
>
>I suspect there is some knee-jerking going on here.
>Certainly C++ is not always fast compared to anything.
>But certainly saying it is always slower than C is not the case either.
>
I can equally well say: C++ is faster than C.
* Code a function to concatenate two strings in C and C++.
* Code some container like vector, list etc. in C by hand and compare
its performance to the STL counterparts.
Not only are the C++ versions much faster, the client code is easier
to write, easier to read etc. AND everything is thoroughly tested. In
your C-version, there might well be bugs in your string concatenation
routine (Don't laugh: I saw a lot of C-like string concatenations
that worked in the first place, but failed later during maintenance of
the program).
================================================
Martin Aupperle
[EMAIL PROTECTED]
(remove NoSpam_)
================================================
------------------------------
From: "Kim,Taesung" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,linux.dev.gcc
Subject: gcc library function reference.
Date: Wed, 30 Jun 1999 17:11:54 +0900
Hello!
Does anybody know where I can get gcc library function reference?
and
Can I have source code of library?
Thank in advance.
------------------------------
From: [EMAIL PROTECTED] (Boudewijn Rempt)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Another Windows developer looking for a good IDE
Date: 30 Jun 1999 07:01:52 GMT
Reply-To: [EMAIL PROTECTED]
David L Jarvis <[EMAIL PROTECTED]> wrote:
>
> Specifically, I need to display a "treeview" (hierarchical tree
> structure), and a
> "listview" (row/column grid type structure).
> In the VisualBasic/Windoze world, I would simply drop a "treeview
> control"
> on a form and be writing code in minutes. Then drop a "listview
> control" on it
> and do the same. (Please spare me the philosophizing about taking such
> shortcuts,
> the key here is to develop a working prototype as quickly as possible)
> Actually I use a component (by ProtoView) that has both treeview &
> listview.
>
Phil, the maintainer of the PyKDE package has added the Qt Treeview
control for me. The package is now in version 0.8, and includes an
example of using the treeview.
I'm a VB programmer by daylight myself, and I find Python and KDE
to be a whole lot better and easier. It's not really visual as such,
but making a quick mock-up is really easy, and Python is very pleasant
as a language.
Take a look at
http://www.xs4all.nl/~bsarempt/python/tutorial.html
--
Boudewijn Rempt | www.xs4all.nl/~bsarempt
------------------------------
From: [EMAIL PROTECTED] (Nathan Myers)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.networking
Subject: Re: Why not C++
Date: 30 Jun 1999 03:27:27 -0700
Johan Kullstam <[EMAIL PROTECTED]> wrote:
>actually i don't mind the templates in C++. they are rather weak, but ...
FUD, again. C++ templates are not weak. They allow construction of
libraries that cannot be constructed in any other language.
If you must disparage something, complain about baroque syntax.
Future languages that manage to address the same problems will
probably use a more tractable syntax, but it would be easy to
fail to match the fundamental power of C++ templates.
--
Nathan Myers
[EMAIL PROTECTED] http://www.cantrip.org/
------------------------------
From: Josef =?iso-8859-1?Q?M=F6llers?= <[EMAIL PROTECTED]>
Subject: Re: serial driver problem
Date: Wed, 30 Jun 1999 12:23:57 +0200
Kuang-chun Cheng wrote:
> =
> Hi,
> =
> I have a GaussMeter (FWBell 9200) which support serial port
> output. The serial port configuration of GaussMeter is
> =
> B1200
> 8 Bit
> 1 Stop
> No Parity
> =
> The meter act as a talker which usually connect to a terminal or
> printer. The connection can be achieve by only two wire (ground and TD=
).
> I connect the meter to Win95/98/NT's HyperTerminal, it works OK. The
> HyperTerminal keep printing the output value of GaussMeter. However, w=
hen
> I use
> =
> cu -1200 -l /dev/ttyS1
> =
> on Linux. Nothing happen :(
> =
> I know the serial driver of Linux is stable. But some how when=
I
> try to control some instruments using serial port under Linux, I always=
have
> problems. For example, the tcdrain() seems not work too. And also, I =
can't
> find any method to set/clear RTS line alone ...
If all you need is to receive the data from the Gauss-meter, you might
try to connect RTS-CTS and DCD-DSR-DTR. The driver then sees itself as
the other device and, when opening the connection, finds an open
connection.
Josef
-- =
PS Die hier dargestellte Meinung ist die persoenliche Meinung des
Autors!
PS This article reflects the autor=B4s personal views only!
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************