[qvwm-e:00318] Re: Forwarded Message From CP Spam Shield

"Dr. Detlef Groth" <[email protected]> Tue, 04 Mar 2003 09:13:35 +0100
Newsgroups gmane.comp.window-managers.qvwm.english
Message-ID <[email protected]>
  >X-Flags: 0000
  >Date: Mon, 03 Mar 2003 13:01:48 -0600
  >From: Chris Sorenson <[email protected]>
  >Reply-To: [email protected]
  >X-ML-Name: qvwm-e
  >X-Mail-Count: 00315
  >X-MLServer: fml [fml 3.0]; post only (only members can post)
  >X-ML-Info: If you have a question, send e-mail with the body
  >	"help" (without quotes) to the address [email protected];
  >	help=<mailto:[email protected]?body=help>
  >Organization: =^..^=
  >X-Accept-Language: en-us, en
  >X-GMX-Antivirus: -1 (not scanned, may not use virus scanner)
  >
  >>
  >>
  >>hello, I want to compile qvwm on a DEC-alpha - machine, however I get the
  >>following error:
  >>
  >>
  >>
  >>-- c++ -DQVWMDIR=\"/project/amphioxus/share/qvwm\" -DIMGDIR=\"/project/amphioxus/share/qvwm/images\" -DSNDDIR=\"/project/amphioxus/share/qvwm/sounds\" -DPATH_RM=\"/usr/ucb/rm\" -DHAVE_CONFIG_H -I.. -I.     -g -O2   -I/usr/local/include -fpermissive -c titlebar.cc
  >>titlebar.cc: In member function `void Qvwm::MotionTitlebar(const Rect&, const 
  >>   Rect&)':
  >>titlebar.cc:263: `usleep' undeclared (first use this function)
  >>titlebar.cc:263: (Each undeclared identifier is reported only once for each 
  >>   function it appears in.)
  >>*** Exit 1
  >>Stop.
  >>*** Exit 1
  >>Stop.
  >>
  >>I tried to dissable HAVE_USLEEP in Config.tmpl and I tried the solaris patch usleep((unsigned
  >>long)10000);
  >>
  >>both without success.
  >>
  >>Thank your for your suggestions.
  >>
  >>regards,
  >>  
  >>
  >usleep is defined in the system header file unistd.h, which is 
  >/usr/include/unistd.h on BSD4.3 compatible systems. Presumably your 
  >DEC-alpha isn't BSD4.3 compatible.
  >
  >unistd.h is included in many of the qvwm C++ files, if your DEC defines 
  >usleep in a different file, you'll need to replace the '#include 
  ><unistd.h>' preprocessor statements in each of the qvwm files with the 
  >correct file name.
  >
  >Try 'grep usleep /usr/include/*.h', or in any other directory where the 
  >system include files may be located, to find the usleep declaration. 
  >It's got to be there somewhere.
  >
  >Perhaps someone who knows DEC Unix can be of more assistance...
  >

Thank your for the suggestion which seems to be going in the right direction.
Sorry I forget to mention the OS it is DEC-OSF4 not a Linux, I believe that
this has an old clib.

There is some usleep in unistd.h and it seems to be only there, but the file
is from 1989.

The relevant part is:

#ifdef _XOPEN_SOURCE_EXTENDED                                                                   
extern int usleep __((useconds_t ));    /* spec1170 requires a value to be returned */          
#else                                                                                           
                                                                                                
#ifndef _XOPEN_SOURCE                                                                           
extern void usleep __((unsigned int));                                                          
#endif  /* _XOPEN_SOURCE */                                                                     
                                                                                                
#endif /* _XOPEN_SOURCE_EXTENDED */                                                             
    

However, via the Makefile the /usr/include is not included:
                               
 c++ -DQVWMDIR=\"/project/amphioxus/share/qvwm\" -DIMGDIR=\"/project/amphioxus/share/qvwm/images\" -DSNDDIR=\"/project/amphioxus/share/qvwm/sounds\" -DPATH_RM=\"/usr/ucb/rm\" -DHAVE_CONFIG_H -I.. -I. -g -O2 -I/usr/local/include  -fpermissive -c titlebar.cc

includeing it via:
 c++ -DQVWMDIR=\"/project/amphioxus/share/qvwm\"
 -DIMGDIR=\"/project/amphioxus/share/qvwm/images\"
 -DSNDDIR=\"/project/amphioxus/share/qvwm/sounds\" -DPATH_RM=\"/usr/ucb/rm\"
 -DHAVE_CONFIG_H -I.. -I. -g -O2 -I/usr/local/include  -I/usr/include  -fpermissive -c titlebar.cc

also does not help, I get a lot of X11-errors now, and usleep is still not
defined. Still a suggestion ?

regards,
Detlef
-- 
Dr. Detlef Groth
Max-Planck-Institut
fuer Molekulare Genetik
Ihnestr. 63/73
D-14195 Berlin
Tel.: + 49 30 - 8413 1235
Email: [email protected]
Email: [email protected]