/[classpath]/classpath/native/target/generic/target_generic_network.h
ViewVC logotype

Diff of /classpath/native/target/generic/target_generic_network.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by rupp, Tue Jul 22 16:19:17 2003 UTC revision 1.7 by rupp, Tue Aug 19 09:07:19 2003 UTC
# Line 43  Systems    : all Line 43  Systems    : all
43  #ifndef __TARGET_GENERIC_NETWORK__  #ifndef __TARGET_GENERIC_NETWORK__
44  #define __TARGET_GENERIC_NETWORK__  #define __TARGET_GENERIC_NETWORK__
45    
 #ifdef __cplusplus  
 extern "C" {  
 #endif  
   
46  /* check if target_native_network.h included */  /* check if target_native_network.h included */
47  #ifndef __TARGET_NATIVE_NETWORK__  #ifndef __TARGET_NATIVE_NETWORK__
48    #error Do NOT INCLUDE generic target files! Include the corresponding native target files instead!    #error Do NOT INCLUDE generic target files! Include the corresponding native target files instead!
# Line 129  extern "C" { Line 125  extern "C" {
125    #include <unistd.h>    #include <unistd.h>
126    #define TARGET_NATIVE_NETWORK_GET_HOSTNAME(name,maxNameLen,result) \    #define TARGET_NATIVE_NETWORK_GET_HOSTNAME(name,maxNameLen,result) \
127      do { \      do { \
128        result=(gethostname(name,maxNameLen-1)!=0)?TARGET_NATIVE_OK:TARGET_NATIVE_ERROR; \        result=(gethostname(name,maxNameLen-1)==0)?TARGET_NATIVE_OK:TARGET_NATIVE_ERROR; \
129        name[maxNameLen-1]='\0'; \        name[maxNameLen-1]='\0'; \
130      } while (0)      } while (0)
131  #endif  #endif
# Line 1278  extern "C" { Line 1274  extern "C" {
1274  /***************************** Functions *******************************/  /***************************** Functions *******************************/
1275    
1276  #ifdef __cplusplus  #ifdef __cplusplus
1277    extern "C" {
1278    #endif
1279    
1280    #ifdef __cplusplus
1281  }  }
1282  #endif  #endif
1283    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26