Linux-Development-Sys Digest #753, Volume #7      Sun, 9 Apr 00 16:13:13 EDT

Contents:
  Re: type inconsistency in open(2) (Weiguang Shi)
  can't find rawmemchar ("dharter")
  Re: Filesize of large files ( 64 bit ) in linux ("Peter T. Breuer")
  Re: struct passwd * (Dan McGuirk)
  conflicting header files ([EMAIL PROTECTED])
  Re: porting WIN32 to UNIX (Linux) ("Robert.H.")
  Looking for Adaptec, SIS, Acerview drivers ("D")
  Re: Looking for Adaptec, SIS, Acerview drivers ("Peter T. Breuer")
  Help me complain to atitrust agency against canon's windows supportiveness! 
("Norwegian Woods")
  Re: conflicting header files (Markus Kossmann)
  Creating a new System Call (Dave Nejdl)
  drivers (Ivan Van den Bossche)
  Re: Creating a new System Call (H. Peter Anvin)
  Re: Creating a new System Call (Robert Lynch)
  Re: conflicting header files ([EMAIL PROTECTED])

----------------------------------------------------------------------------

From: Weiguang Shi <[EMAIL PROTECTED]>
Subject: Re: type inconsistency in open(2)
Date: Sat, 8 Apr 2000 20:44:13 -0600

Oh, sorry. I am working on a course project on a Linux system with kernel
version 2.0.38.

Weiguang


------------------------------

From: "dharter" <[EMAIL PROTECTED]>
Subject: can't find rawmemchar
Crossposted-To: linux.redhat,linux.redhat.rpm
Reply-To: [EMAIL PROTECTED]
Date: Sun, 09 Apr 2000 03:27:29 GMT

When I try to run netscape, I get this message.
I am using redhat 6.0 with some rpms from 6.1 and 6.2.
The undefined symbol is in glibc-2.1.3 and other rpms.
What could be wrong here and how could I debug this?

$netscape
/usr/lib/netscape/netscape-communicator: error in loading shared libraries
/usr/X11R6/lib/libXt.so.6: undefined symbol: __rawmemchr
$ nm /usr/X11R6/lib/libXt.so.6 | grep rawmemchr
         U __rawmemchr@@GLIBC_2.1
$ rpm -qa | grep glibc
glibc-profile-2.1.3-15
compat-glibc-5.2-2.0.7.1
glibc-devel-2.1.3-15
glibc-2.1.3-15   
$rpm -qa | grep ld
ldconfig-1.9.5-16
ld.so-1.9.5-13   

Thanks for any help.

------------------------------

From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.development,comp.os.linux.development.apps,linux.dev.c-programming,linux.redhat.development
Subject: Re: Filesize of large files ( 64 bit ) in linux
Date: 9 Apr 2000 05:36:48 GMT

In comp.os.linux.development Mike <[EMAIL PROTECTED]> wrote:
: Im trying to determine the size of a partition/disk device in Linux,
: and Im not haveing any luck.

: If I open the device, and make a call to fstat64(), it comes back
: with an incorrect byte count. No matter what combination of
: fstat/fstat64(), etc. I try, it doesnt seem to work correctly.
: Im useing the latest versions of software includeing kernel 2.3.99-pre3.

: If anyone knows how to do this, could you post a small program
: that opens a device ( /dev/hde for example ) and prints its size
: in bytes ( the test drive i have is 40 gig, so large file support is
: needed )

You can generally use an ioctl call on the opened descriptor ...

               off_t es = 0;
               DEBUG("looking for export size with ioctl BLKGETSIZE\n");
               if( ! ioctl(fd, BLKGETSIZE, &es) && es != 0) {
                  es *= 512; /* assume blocksize 512 */
                  size = es;
               }


Peter

------------------------------

From: Dan McGuirk <[EMAIL PROTECTED]>
Subject: Re: struct passwd *
Date: Sat, 08 Apr 2000 23:50:17 -0700

bill davidsen wrote:
>   Someone have the source for glibc handy? I don't, and I'm not going to
> go grab it.

You don't need the source, just the documentation.  From the glibc
manual:

 - Function: struct passwd * getpwuid (uid_t UID)
     This function returns a pointer to a statically-allocated structure
     containing information about the user whose user ID is UID.  This
     structure may be overwritten on subsequent calls to `getpwuid'.

     A null pointer value indicates there is no user in the data base
     with user ID UID.

I don't know about other distributions, but on Red Hat this is only an
'F1 i' away.

The Linux man page seems to kind of suck.  For example, the FreeBSD man
page contains the following section:

BUGS
     The functions getpwent(), getpwnam(), and getpwuid(), leave their
results
     in an internal static object and return a pointer to that object.
Subse-
     quent calls to the same function will modify the same object.

And the AIX man page says this:

    Attention: All information generated by the getpwent, getpwnam, and
getpwuid
    subroutines is stored in a static area. Subsequent calls to these
    subroutines overwrite this static area. To save the information in
the
    static area, applications should copy it.

-- 
Dan McGuirk  <[EMAIL PROTECTED]>

Hay aviones cada hora.

------------------------------

From: [EMAIL PROTECTED]
Subject: conflicting header files
Date: Sun, 09 Apr 2000 07:47:42 GMT

When I get compile errors like those shown below, I wonder what is going
on with this.  Can anyone tell me why it is that some things have to be
defined in more than one place, and cannot be included from a singular
place that uses #ifndef to block redundancies?

Here's what I got on a recent program, which because of the apparently
system conflicts, I could not readily say the fault was the authors.
Can someone tell me who/what is the real culprit behind this (the
needless redundancy)?

In file included from /usr/include/stdio.h:40,
                 from ttyresize.c:41:
/usr/include/bits/types.h:95: warning: `__NFDBITS' redefined
/usr/include/linux/posix_types.h:22: warning: this is the location of the previous 
definition
/usr/include/bits/types.h:97: warning: `__FDMASK' redefined
/usr/include/linux/posix_types.h:34: warning: this is the location of the previous 
definition
In file included from /usr/include/stdlib.h:339,
                 from ttyresize.c:43:
/usr/include/sys/types.h:185: warning: `__BIT_TYPES_DEFINED__' redefined
/usr/include/linux/types.h:73: warning: this is the location of the previous definition
In file included from /usr/include/sys/select.h:31,
                 from /usr/include/sys/types.h:193,
                 from /usr/include/stdlib.h:339,
                 from ttyresize.c:43:
/usr/include/bits/select.h:36: warning: `__FD_ZERO' redefined
/usr/include/asm/posix_types.h:69: warning: this is the location of the previous 
definition
/usr/include/bits/select.h:42: warning: `__FD_SET' redefined
/usr/include/asm/posix_types.h:45: warning: this is the location of the previous 
definition
/usr/include/bits/select.h:47: warning: `__FD_CLR' redefined
/usr/include/asm/posix_types.h:50: warning: this is the location of the previous 
definition
/usr/include/bits/select.h:56: warning: `__FD_ISSET' redefined
/usr/include/asm/posix_types.h:58: warning: this is the location of the previous 
definition
In file included from /usr/include/sys/types.h:193,
                 from /usr/include/stdlib.h:339,
                 from ttyresize.c:43:
/usr/include/sys/select.h:63: warning: `FD_SET' redefined
/usr/include/linux/time.h:69: warning: this is the location of the previous definition
/usr/include/sys/select.h:64: warning: `FD_CLR' redefined
/usr/include/linux/time.h:70: warning: this is the location of the previous definition
/usr/include/sys/select.h:65: warning: `FD_ISSET' redefined
/usr/include/linux/time.h:71: warning: this is the location of the previous definition
/usr/include/sys/select.h:66: warning: `FD_ZERO' redefined
/usr/include/linux/time.h:72: warning: this is the location of the previous definition
In file included from /usr/include/sys/wait.h:39,
                 from ttyresize.c:48:
/usr/include/bits/waitflags.h:26: warning: `WNOHANG' redefined
/usr/include/linux/wait.h:4: warning: this is the location of the previous definition
/usr/include/bits/waitflags.h:27: warning: `WUNTRACED' redefined
/usr/include/linux/wait.h:5: warning: this is the location of the previous definition
In file included from /usr/include/termios.h:40,
                 from ttyresize.c:49:
/usr/include/bits/termios.h:28: warning: `NCCS' redefined
/usr/include/asm/termbits.h:10: warning: this is the location of the previous 
definition


-- 
| Phil Howard - KA9WGN | My current boycotts: Amazon.Com, DVDs, Mattel, Sony
| [EMAIL PROTECTED] +----------------------------------------------------
| Dallas - Texas - USA | My current websites: linuxhomepage.com, ham.org

------------------------------

From: "Robert.H." <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.development.apps,comp.os.linux.development,comp.os.ms-windows.programmer.win32
Subject: Re: porting WIN32 to UNIX (Linux)
Date: Sun, 09 Apr 2000 10:09:49 +0200

[EMAIL PROTECTED] wrote:

> In article <[EMAIL PROTECTED]>,
>   Johannes Hacker <[EMAIL PROTECTED]> wrote:
> > Hello!
> >
> > I am currently working on a project where I have
> to port a WinNT
> > Application to Linux. I am mainly focused on
> threads, processes,
> > synchronization and messaging between processes.
> I've heard about the
> > POSIX-Standard, but I really don't know where to
> begin.
> > Are there any documents, links, ... available
> about porting in general?
> > This problem sounds not so unusual, I am sure
> this has been done before!
> >
> > kind regards,            jo hacker.
> >
> >
> I have the same query but slighlty more specific.
> I have a WinNT threaded application that uses
> mutexes and semaphores for synchronisation but
> WinNT (not having POSIX compliant threads) has a
> method WaitForMultipleObjects() which allows you
> to wait for one of several objects
> (mutex/semaphore) to become availble or else
> timeout.  Are there any thread libraries for Linux
> that mirror this fuctionality?  The method I've
> been forced to employ is to create a thead for
> each object to be waited on and a thread for the
> timeout.  This is far from satisfactory since it
> creates a huge overhead and means I have to send
> pthread_kill(CANCEL) calls to the blocking thread
> if the timeout occurs and visa-versa.  Any healp
> would be appreciated.
>
> Cheers
> Al
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Use MainWin (www.mainsoft.com) that provides a full Win32 API repertoire
on Linux (and other Unixes).

Robert


------------------------------

From: "D" <[EMAIL PROTECTED]>
Subject: Looking for Adaptec, SIS, Acerview drivers
Date: Sun, 09 Apr 2000 13:49:08 GMT

I'm looking for the following driver(s). If you have them or know where I
can get them, please let me know at [EMAIL PROTECTED] Thanks!

SCSI:
Adaptec AHA-152x/AHA-1510

VIDEO ADAPTER:
SiS (Silicon Integrated Systems Corp)530 Rev A2 8MB

MONITOR:
Acer ACERVIEW 51F




------------------------------

From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Subject: Re: Looking for Adaptec, SIS, Acerview drivers
Date: 9 Apr 2000 13:53:11 GMT

D <[EMAIL PROTECTED]> wrote:
: I'm looking for the following driver(s). If you have them or know where I
: can get them, please let me know at [EMAIL PROTECTED] Thanks!

: SCSI:
: Adaptec AHA-152x/AHA-1510

Part of the kernel source for the last 7 years.

: VIDEO ADAPTER:
: SiS (Silicon Integrated Systems Corp)530 Rev A2 8MB

Dunno. Throw it away and buy something less problematic.

: MONITOR:
: Acer ACERVIEW 51F

No driver needed. You video card is there to drive it!


Peter

------------------------------

From: "Norwegian Woods" <[EMAIL PROTECTED]>
Subject: Help me complain to atitrust agency against canon's windows supportiveness!
Date: Sun, 9 Apr 2000 16:16:42 +0200

Send the following to [EMAIL PROTECTED] :

I hereby presents a complaint about Canon U.S.A. Inc.(from now on reffered
to as Canon). I think that Canon is breaking The Clayton Act. They provide
drivers for only operating systems made by Microsoft Corporation (Windows
2000, Windows 98, and Windows 95). Goto
http://128.11.41.160/goto.shtml?/techsupport/downloads/index.html and look
at the Canon BJC 4400 and similar products. You will clearly see that a lot
of there product can only be used with operating system made by Microsoft
Corporation. Thereby preventing the consumer from choosing freely among
operating systems (Linux, PowerMac, and BeOS). That is against The Clayton
Act.

Greetings
from
<your name>

PLEASE for the sake of open source & free mind.




------------------------------

From: Markus Kossmann <[EMAIL PROTECTED]>
Subject: Re: conflicting header files
Date: Sun, 09 Apr 2000 10:48:04 +0200

[EMAIL PROTECTED] wrote:
> 
> When I get compile errors like those shown below, I wonder what is going
> on with this.  Can anyone tell me why it is that some things have to be
> defined in more than one place, and cannot be included from a singular
> place that uses #ifndef to block redundancies?
[...]
> 
> In file included from /usr/include/stdio.h:40,
>                  from ttyresize.c:41:
> /usr/include/bits/types.h:95: warning: `__NFDBITS' redefined
> /usr/include/linux/posix_types.h:22: warning: this is the location of the previous 
>>definition

Well,it seems  you are tring to compile sources designed for libc-5 on a
libc-6 system . 

On a libc-5 system, the kernel headers were integral part of the libc
includes. But on a libc-6 system you _must_not_ use the kernel header
files for user level programs. 
To compile that program , you have to replace all #include <linux/*.h >
and <asm/*.h> by their libc-6 counterparts.  
--
Markus Kossmann                                    
[EMAIL PROTECTED]

------------------------------

From: Dave Nejdl <[EMAIL PROTECTED]>
Subject: Creating a new System Call
Date: Sun, 09 Apr 2000 16:41:06 GMT

I am writing a kernel module and I want to create a *new* system call.
My knowledge is very shaky from here on, because I've been forced to
just study header files and such.
-First, I think I need to register my function in sys_call_table[], but
using what system call number? I see in asm/unistd.h that the last
system call is 190, is it safe to just put my function in
sys_call_table[191]?
/*is that all I have to do on the kernel end?*/
-To call the newly created system call from a user space program, can I
just call it?

Thanks,
Dave Nejdl


------------------------------

From: Ivan Van den Bossche <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: drivers
Date: Sun, 09 Apr 2000 18:59:28 GMT

Hello,

Is there somebody who can tell me where to find documentation about how
to write drivers especially videodrivers for Linux???

Thanks

[EMAIL PROTECTED]



------------------------------

From: [EMAIL PROTECTED] (H. Peter Anvin)
Subject: Re: Creating a new System Call
Date: 9 Apr 2000 12:09:39 -0700
Reply-To: [EMAIL PROTECTED] (H. Peter Anvin)

Followup to:  <[EMAIL PROTECTED]>
By author:    Dave Nejdl <[EMAIL PROTECTED]>
In newsgroup: comp.os.linux.development.system
>
> I am writing a kernel module and I want to create a *new* system call.
> My knowledge is very shaky from here on, because I've been forced to
> just study header files and such.
> -First, I think I need to register my function in sys_call_table[], but
> using what system call number? I see in asm/unistd.h that the last
> system call is 190, is it safe to just put my function in
> sys_call_table[191]?
> /*is that all I have to do on the kernel end?*/
> -To call the newly created system call from a user space program, can I
> just call it?
> 

Creating a system call is something that should be avoided if at all
possible.  Consider using filesystem operations (read, write, ioctl)
on a device node first.

If you absolutely must, you need to get Linus to reserve a number for
you; otherwise the number is going to get allocated for something else
next time a number is needed.

        -hpa
-- 
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
"Unix gives you enough rope to shoot yourself in the foot."

------------------------------

Date: Sun, 09 Apr 2000 12:28:19 -0700
From: Robert Lynch <[EMAIL PROTECTED]>
Subject: Re: Creating a new System Call

Dave Nejdl wrote:
> 
> I am writing a kernel module and I want to create a *new* system call.
> My knowledge is very shaky from here on, because I've been forced to
> just study header files and such.
> -First, I think I need to register my function in sys_call_table[], but
> using what system call number? I see in asm/unistd.h that the last
> system call is 190, is it safe to just put my function in
> sys_call_table[191]?
> /*is that all I have to do on the kernel end?*/
> -To call the newly created system call from a user space program, can I
> just call it?
> 
> Thanks,
> Dave Nejdl

You might find some pointers in the example:
====
/* syscall.c
 *
 * System call "stealing" sample
 */


/* Copyright (C) 1998-99 by Ori Pomerantz */
...
====
part of the "Linux Kernel Module Programming Guide", available for free
on metlab, and wherever.

HTH. Bob L.
-- 
Robert Lynch-Berkeley CA [EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED]
Subject: Re: conflicting header files
Date: Sun, 09 Apr 2000 20:06:38 GMT

On Sun, 09 Apr 2000 10:48:04 +0200 Markus Kossmann <[EMAIL PROTECTED]> wrote:
| [EMAIL PROTECTED] wrote:
|> 
|> When I get compile errors like those shown below, I wonder what is going
|> on with this.  Can anyone tell me why it is that some things have to be
|> defined in more than one place, and cannot be included from a singular
|> place that uses #ifndef to block redundancies?
| [...]
|> 
|> In file included from /usr/include/stdio.h:40,
|>                  from ttyresize.c:41:
|> /usr/include/bits/types.h:95: warning: `__NFDBITS' redefined
|> /usr/include/linux/posix_types.h:22: warning: this is the location of the previous 
|>definition
|
| Well,it seems  you are tring to compile sources designed for libc-5 on a
| libc-6 system . 
|
| On a libc-5 system, the kernel headers were integral part of the libc
| includes. But on a libc-6 system you _must_not_ use the kernel header
| files for user level programs. 
| To compile that program , you have to replace all #include <linux/*.h >
| and <asm/*.h> by their libc-6 counterparts.  

It compiles OK (but does not link due to missing functions "outw", "outb",
and "inb") in Slackware 7.0 (libc-6 based, right?) but the compile failure
where I see the redundancy in the headers is in Redhat 6.0 (also libc-6
based, right?).

So what are the libc-6 counterparts?  How do I name translate a header for
one into a header for the other other?  Is there a name to name mapping or
is there a simple subdir where all the stuff is in?  I know it's NOT "sys"
because that's what the program _IS_ including.

The exact program I am compiling (because I can't use the binary of it due
to an incomplete PCI device vendor table which I need to add to) in case
you want to try it yourself is:
ftp://metalab.unc.edu/pub/Linux/utils/console/SVGATextMode-1.9-src.tar.gz

-- 
| Phil Howard - KA9WGN | My current boycotts: Amazon.Com, DVDs, Mattel, Sony
| [EMAIL PROTECTED] +----------------------------------------------------
| Dallas - Texas - USA | My current websites: linuxhomepage.com, ham.org

------------------------------


** 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
******************************

Reply via email to