Closed Bug 241961 Opened 20 years ago Closed 20 years ago

Can't add more than one entry on OS/2

Categories

(Calendar :: Internal Components, defect)

x86
OS/2
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mkaply, Assigned: mkaply)

Details

Attachments

(1 file, 1 obsolete file)

On OS/2 you can only add one entry.

I tracked down the problem to icalfileset.c.

The problem is that after a write, icalfileset truncates the file to the
returned size.

In the OS/2 case, the returned size is smaller than the actual file because we
use 0x0A 0x0D line endings.

I tried to fix this by taking the Windows case (which should work) but the
chsize crashed for some reason (we're investigating this with the OS/2 team)

So I had to add an OS/2 specific case that did ftruncate with the results of tell.
Attached patch Fix (obsolete) — — Splinter Review
Comment on attachment 147233 [details] [diff] [review]
Fix

r=mostafah
Attachment #147233 - Flags: first-review+
Fix checked in.

I put it on the 1.7 branch as well.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
From looking at the diff alone, I think you are missing a #else after that 
#endif for the Mac check...

could be wrong though.  havent applied the patch, and don't have my computer 
with the source code on it at hand.
Attached patch Better fix — — Splinter Review
You are correct.

It still compiled so I missed.

I'm redoing this #ifdef group to be more readable. All these nested #ifndefs
are silly

if windows
do a
else if OS/2
do b
else if Mac
No ftruncate
else everyone else
ftruncate
end
Assignee: gray → mkaply
Attachment #147233 - Attachment is obsolete: true
Status: RESOLVED → ASSIGNED
Resolution: FIXED → ---
Comment on attachment 147330 [details] [diff] [review]
Better fix

r=mostafah
Attachment #147330 - Flags: first-review+
OK, really fixed this time.

Sorry about that.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago20 years ago
Resolution: --- → FIXED
QA Contact: gurganbl → libical
Component: libical → Internal Components
The bugspam monkeys have been set free and are feeding on Calendar :: Internal Components. Be afraid for your sanity!
QA Contact: libical → base
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: