Opened 21 years ago

Last modified 21 years ago

#333 closed defect (fixed)

C++ comments in ogr_core.h not portable

Reported by: Markus Neteler Owned by: warmerdam
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc:

Description

Frank,

while trying to make GRASS 5.1 portable (SGI etc) I found that GRASS
refuses to compile the ogr_core.h when being more restrictive. Reason
is the usage of C++ style comments which are driving some C compilers
crazy. Here a diff to fix that:

ogr_core.h.diff

--- /usr/local/include/ogr_core.h	Thu May  8 11:07:14 2003
+++ ogr_core.h	Wed Apr 30 09:37:41 2003
@@ -166,17 +166,17 @@
 
 typedef enum 
 {
-    wkbUnknown = 0,             /* non-standard */
-    wkbPoint = 1,               /* rest are standard WKB type codes */
+    wkbUnknown = 0,             // non-standard
+    wkbPoint = 1,               // rest are standard WKB type codes
     wkbLineString = 2,
     wkbPolygon = 3,
     wkbMultiPoint = 4,
     wkbMultiLineString = 5,
     wkbMultiPolygon = 6,
     wkbGeometryCollection = 7,
-    wkbNone = 100,              /* non-standard, for pure attribute records */
-    wkbLinearRing = 101,        /* non-standard, just for createGeometry() call */
-    wkbPoint25D = 0x80000001,       /* 2.5D extensions as per 99-402 */
+    wkbNone = 100,              // non-standard, for pure attribute records
+    wkbLinearRing = 101,        // non-standard, just for createGeometry() call
+    wkbPoint25D = 0x80000001,       // 2.5D extensions as per 99-402
     wkbLineString25D = 0x80000002,
     wkbPolygon25D = 0x80000003,
     wkbMultiPoint25D = 0x80000004,
@@ -247,7 +247,7 @@
     int         Integer;
     double      Real;
     char       *String;
-    /* wchar    *WideString; */
+    // wchar    *WideString;
     
     struct {
         int     nCount;
@@ -264,11 +264,10 @@
         char    **paList;
     } StringList;
 
-/*    union {
-*        int   nCount;
-*        wchar *paList;
-*    } WideStringList;
-*/
+//    union {
+//        int   nCount;
+//        wchar *paList;
+//    } WideStringList;
 
     struct {
         int     nMarker1;


Please update the file in OGR. Thanks,

 Markus Neteler

Attachments (1)

ogr_core.h.diff (1.6 KB ) - added by neteler@… 21 years ago.
ogr_core.h.diff as attachment

Download all attachments as: .zip

Change History (2)

by neteler@…, 21 years ago

Attachment: ogr_core.h.diff added

ogr_core.h.diff as attachment

comment:1 by warmerdam, 21 years ago

ogr_core.h corrected in CVS.

Thanks

Note: See TracTickets for help on using tickets.