Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Apr 2000 19:07:41 -0400
From:      "Gary T. Corcoran" <gcorcoran@lucent.com>
To:        freebsd-hackers@freebsd.org
Subject:   Help? Device driver 'make depend' errors from comments
Message-ID:  <38EA75BD.EEA71C22@lucent.com>

next in thread | raw e-mail | index | archive | help
Since I received exactly ZERO responses to my plea for help in making
my network device driver a loadable module, I'm now trying to compile
my driver into the kernel.  

First, I made up a makefile and got my driver compiling cleanly
standalone in my directory.  So the code is known good with respect
to compiling under FreeBSD with gcc.  Then I moved the code under
the /sys hierarchy, fixed up my configuration file, and did a 'config'
for my kernel.  So far, so good.

But then when I moved to the compile directory and did a 'make depend',
all heck broke loose.  I'm getting hundreds of errors and/or warnings.
Checking the code, it seems to be complaining (or rather getting
confused) about two major things:

1. Comments following a #if or #ifdef, for example:
#ifdef FOO   // not yet tested
While this only generates a 'warning', I'm also getting actual
(supposed) errors about 'unbalanced #endif' and the like.  Though
it is possible these errors are related to problem number 2 instead:

2. It complains (doesn't say 'warning' so I suppose it takes them
as errors?) about "unterminated string or character constant"
whenever I have an apostrophe WITHIN A // COMMENT !!!  For example,
just including the word "don't" within a comment is causing problems.

So how do I "turn off" these "features" of 'make depend' ???  ;-)

Now this is a common codebase for this driver, which compiles fine
for Windows and Linux, and, as mentioned above, it compiles fine
(stand-alone) for FreeBSD.  So obviously it is syntactically-good
C code for gcc, so why am I having all these problems?  There are
over 50,000 lines of code, so please don't tell me to go changing
all the comments and #if lines!   Any (other :) suggestions
would be appreciated...

Thanks,
Gary
-- 
=======================================================
Gary Corcoran - Distinguished Member of Technical Staff
Lucent Microelectronics - Client Access Broadband Systems
   Communications Protocol & Driver Development Group
   "We make the drivers that make communications work"
              Email: gcorcoran@lucent.com
-------------------------------------------------------
There are only two kinds of machines - those that fail
little by little, and those that fail all at once.
=======================================================


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38EA75BD.EEA71C22>