[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ntop-dev
Subject:    RE: [Ntop-dev] enum definition missing in ntop_darwin.c ?
From:       "Burton M. Strauss III" <Burton () ntopsupport ! com>
Date:       2002-11-13 14:12:33
Message-ID: JIEPJGFPFMFIGBNCPKGGOEHNDCAA.Burton () ntopsupport ! com
[Download RAW message or body]

As that source is unique to the Mac and I don't have one... this is a guess.

If you diff the current (cvs) version against 2.1.3, you'll see that bool
has been eliminated in favor of int.  I'm guessing that bool was unique to
OS9 or something.

Try backporting the cvs module.

-----Burton

-----Original Message-----
From: ntop-dev-admin@unipi.it [mailto:ntop-dev-admin@unipi.it]On Behalf
Of Patrick Näf
Sent: Monday, November 11, 2002 10:30 PM
To: ntop-dev@Unipi.IT
Subject: [Ntop-dev] enum definition missing in ntop_darwin.c ?


I have downloaded ntop-2.1.3 and tried to compile the source package on
my PowerMac G4 with OS X 10.2.1 and gcc 3.1 installed. I went about it
this way:

./autogen.sh -1
./configure
make

Somewhere along the line the build process stopped with this error:

gcc -DHAVE_CONFIG_H -I. -I. -I. -I.
-I/Volumes/progs/System/fink/include -no-cpp-precomp -DDARWIN -g
-I/Volumes/progs/System/fink/include -pipe -c ntop_darwin.c
-Wp,-MD,.deps/ntop_darwin.TPlo  -fno-common -DPIC -o
.libs/ntop_darwin.lo
ntop_darwin.c:113: return type is an incomplete type
ntop_darwin.c: In function `NSMakePrivateModulePublic':
ntop_darwin.c:124: warning: `return' with a value, in function
returning void
ntop_darwin.c:126: invalid use of undefined type `enum bool'
ntop_darwin.c:126: warning: `return' with a value, in function
returning void
ntop_darwin.c: In function `dlopen':
ntop_darwin.c:284: void value not ignored as it ought to be
ntop_darwin.c:366: void value not ignored as it ought to be
make[2]: *** [ntop_darwin.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
### execution of make failed, exit code 2



I looked into the file ntop_darwin.c and didn't understand anything
that happened in there :-) As a C layman it simply occurred to me that
the definition of "enum bool" was missing, so I added this line

enum bool { false = 0, true = 1 };

...and voilà - the package compiled...


Btw: as you can see from make's output above I'm trying to package ntop
for fink. If you need any further information regarding this please
feel free to ask.

Patrick



----------------------------------------------------------------------
Patrick Naef                "The Queen of Hearts, she made some tarts,
Lucerne, Switzerland                              All on a summer day:
herzbube@herzbube.ch        The Knave of Hearts, he stole those tarts,
ICQ# 120279211                              And took them quite away!"

_______________________________________________
Ntop-dev mailing list
Ntop-dev@unipi.it
http://listgateway.unipi.it/mailman/listinfo/ntop-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic