Skip to contentSkip to conversation

RTC !

DISCUSSION [email protected] 1 participant 1 message Apr 21, 2001

lore
Share & tools
lore
#0 lore raw

Can someone help me with this !!!

With Regards,
--Niraj

Niraj Punmia
04/21/2001 03:42 PM

To: Jesper Juhl <[email protected]>
cc:

Subject: Re: RTC ! (Document link not converted)

The version of gcc , i am using is also egcs-2.91.66 !! How come i am getting this problem???

Jesper Juhl <[email protected]> on 04/20/2001 07:34:47 PM

To: Niraj Punmia/HSS@HSS
cc:

Subject: Re: RTC !

Quoted 1 line · [email protected] wrote:

I am using Linux 2.2.18 with KURT patch installed! I don't know which gcc/

egcs

Quoted 1 line

i am using ? How do we check it?

gcc --version

/Jesper Juhl

---------------------- Forwarded by Niraj Punmia/HSS on 04/21/2001 04:10 PM
---------------------------

Niraj Punmia
04/20/2001 05:29 PM

To: Jesper Juhl <[email protected]>
cc:

Subject: Re: RTC ! (Document link not converted)

I am using Linux 2.2.18 with KURT patch installed! I don't know which gcc/ egcs i am using ? How do we check it?

--Regards,
--Niraj

Jesper Juhl <[email protected]> on 04/20/2001 06:08:57 PM

To: Niraj Punmia/HSS@HSS
cc: [email protected]

Subject: Re: RTC !

Quoted 17 lines · [email protected] wrote:

Hi,

When i compiled the following program , (taken from /usr/src/linux/Documentation/rtc.txt )

(See attached file: rtc2.c)

it gave me the following error:

[root@msatuts1 timer1]# gcc -s -Wall -Wstrict-prototypes rtc2.c -o rtc2 In file included from rtc2.c:17:
/usr/include/linux/mc146818rtc.h:29: parse error before `rtc_lock' /usr/include/linux/mc146818rtc.h:29: warning: data definition has no type or storage class
rtc2.c:25: warning: return type of main' is not int' [root@msatuts1 timer1]#

Quoted 1 line

Is this a bug?Can anyone tell me how to remove this parse error ?

It works fine for me using a 2.2.16 kernel and egcs-2.91.66 (see below)...

bash-2.04$ gcc -s -Wall -Wstrict-prototypes rtc2.c -o rtc2 rtc2.c:24: warning: return type of main' is not int' bash-2.04$ ./rtc2

RTC Driver Test Example.

Counting 5 update (1/sec) interrupts from reading /dev/rtc: 1 2 3 4 5 Again, from using select(2) on /dev/rtc: 1 2 3 4 5

Current RTC date/time is 20-4-2001, 12:34:01.
Alarm time now set to 12:34:06.
Waiting 5 seconds for alarm... okay. Alarm rang.

Periodic IRQ rate was 1024Hz.
Counting 20 interrupts at:

2Hz:     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
4Hz:     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
8Hz:     1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
16Hz:    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
32Hz:    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
64Hz:    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
                         *** Test complete ***

Typing "cat /proc/interrupts" will show 131 more events on IRQ 8.

bash-2.04$

Regards,
Jesper Juhl
[email protected]

To: [email protected]
cc:

Subject: RTC !

Hi,

When i compiled the following program , (taken from /usr/src/linux/Documentation/rtc.txt )

(See attached file: rtc2.c)

it gave me the following error:

[root@msatuts1 timer1]# gcc -s -Wall -Wstrict-prototypes rtc2.c -o rtc2 In file included from rtc2.c:17:
/usr/include/linux/mc146818rtc.h:29: parse error before `rtc_lock' /usr/include/linux/mc146818rtc.h:29: warning: data definition has no type or storage class
rtc2.c:25: warning: return type of main' is not int' [root@msatuts1 timer1]#

Is this a bug?Can anyone tell me how to remove this parse error ?

With Regards,
--Niraj