Opened 16 years ago

Closed 15 years ago

#2870 closed bug (fixed)

"C" headers shouldn't contain "C++" like comments

Reported by: kaliber Owned by: axeld
Priority: normal Milestone: R1
Component: - General Version: R1/pre-alpha1
Keywords: Cc: andreas.faerber@…
Blocked By: Blocking:
Platform: All

Description

I was trying to build unzip - ftp://ftp.info-zip.org/pub/infozip/src/unzip552.tgz, but it fails due to wrong comments in .h files

At least following headers should be fixed:

Kernel/OS.h
Support/ByteOrder.h
Support/SupportDefs.h
Storage/FindDirectory.h
Storage/Mime.h

Attachments (2)

ticket2870.diff (15.8 KB ) - added by scottmc 15 years ago.
patch to fix comments in OS.h, ByteOrder.h, FindDirectory.h and Mime.h
header-patch.diff (136.2 KB ) - added by scottmc 15 years ago.
this patch is the result of running kaliber's script on the os header folder

Download all attachments as: .zip

Change History (6)

comment:1 by andreasf, 16 years ago

Cc: andreas.faerber@… added

In #2203 I provided a patch to fix the POSIX headers for freetype, you could do the same for the headers you need for unzip. :)

comment:2 by kaliber, 16 years ago

It is possible to convert comments automatically e.g on Ubuntu:

#!/bin/sh

for i in `find . -name '*.h'`
do
    fix=0
    grep "class" $i || fix=1
    if [ "$fix" = 1 ]
    then
        mv $i $i.bak
        ccmtcnvt $i.bak > $i
        rm -f $i.bak
    fi
done

by scottmc, 15 years ago

Attachment: ticket2870.diff added

patch to fix comments in OS.h, ByteOrder.h, FindDirectory.h and Mime.h

comment:3 by stippi, 15 years ago

Patch applied in hrev28598. Thanks! Can this be closed then, or is there more?

by scottmc, 15 years ago

Attachment: header-patch.diff added

this patch is the result of running kaliber's script on the os header folder

comment:4 by axeld, 15 years ago

Resolution: fixed
Status: newclosed

The last patch is pretty much useless, as most of these headers are in fact C++ headers, and there is no reason not to use those comments in there.

I guess we can consider this bug fixed.

Note: See TracTickets for help on using tickets.