Opened 10 years ago

Closed 10 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:
Has a Patch: no 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 10 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 10 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 Changed 10 years ago by andreasf

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 Changed 10 years ago by kaliber

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

Changed 10 years ago by scottmc

Attachment: ticket2870.diff added

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

comment:3 Changed 10 years ago by stippi

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

Changed 10 years ago by scottmc

Attachment: header-patch.diff added

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

comment:4 Changed 10 years ago by axeld

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.