Advertisement
Guest User

sizeof short

a guest
Mar 16th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 6.35 KB | None | 0 0
  1. /* confdefs.h */
  2. #define PACKAGE_NAME "Net-SNMP"
  3. #define PACKAGE_TARNAME "net-snmp"
  4. #define PACKAGE_VERSION "5.7.3"
  5. #define PACKAGE_STRING "Net-SNMP 5.7.3"
  6. #define PACKAGE_BUGREPORT "net-snmp-coders@lists.sourceforge.net"
  7. #define PACKAGE_URL ""
  8.  
  9. #define NETSNMP_ENABLE_SCAPI_AUTHPRIV 1
  10. #define NETSNMP_USE_INTERNAL_MD5 1
  11. #define NETSNMP_WITH_OPAQUE_SPECIAL_TYPES 1
  12. #define NETSNMP_PERSISTENT_MASK 077
  13. #define NETSNMP_TEMP_FILE_PATTERN "/tmp/snmpdXXXXXX"
  14. #define NETSNMP_AGENTX_SOCKET "/var/agentx/master"
  15. #define NETSNMP_DEFAULT_SNMP_VERSION 3
  16. #define NETSNMP_SYS_CONTACT "nobody@nowhere.invalid"
  17. #define NETSNMP_SYS_LOC "somewhere"
  18. #define NETSNMP_LOGFILE "/var/log/snmpd.log"
  19. #define NETSNMP_PERSISTENT_DIRECTORY "/var/net-snmp"
  20. #define UNAMEPROG "/usr/bin/uname"
  21. #define STDC_HEADERS 1
  22. #define HAVE_SYS_TYPES_H 1
  23. #define HAVE_SYS_STAT_H 1
  24. #define HAVE_STDLIB_H 1
  25. #define HAVE_STRING_H 1
  26. #define HAVE_MEMORY_H 1
  27. #define HAVE_STRINGS_H 1
  28. #define HAVE_INTTYPES_H 1
  29. #define HAVE_STDINT_H 1
  30. #define HAVE_UNISTD_H 1
  31. #define __EXTENSIONS__ 1
  32. #define _ALL_SOURCE 1
  33. #define _GNU_SOURCE 1
  34. #define _POSIX_PTHREAD_SEMANTICS 1
  35. #define _TANDEM_SOURCE 1
  36. #define HAVE_DLFCN_H 1
  37. #define LT_OBJDIR ".libs/"
  38. #define NETSNMP_SYSTEM_INCLUDE_FILE "net-snmp/system/freebsd10.h"
  39. #define NETSNMP_MACHINE_INCLUDE_FILE "net-snmp/machine/generic.h"
  40. #define SNMPLIBPATH "/usr/local/lib/snmp"
  41. #define SNMPDLMODPATH "/usr/local/lib/snmp/dlmod"
  42. #define SNMPSHAREPATH "/usr/local/share/snmp"
  43. #define NETSNMP_DEFAULT_MIBDIRS "$HOME/.snmp/mibs:/usr/local/share/snmp/mibs"
  44. #define SNMPCONFPATH "/usr/local/etc/snmp"
  45. #define STDC_HEADERS 1
  46. #define HAVE_DIRENT_H 1
  47. #define HAVE_SYS_WAIT_H 1
  48. #define HAVE_GETOPT_H 1
  49. #define HAVE_PTHREAD_H 1
  50. #define HAVE_REGEX_H 1
  51. #define HAVE_STRING_H 1
  52. #define HAVE_SYSLOG_H 1
  53. #define HAVE_UNISTD_H 1
  54. #define HAVE_STDINT_H 1
  55. #define HAVE_INTTYPES_H 1
  56. #define HAVE_SYS_PARAM_H 1
  57. #define HAVE_SYS_SELECT_H 1
  58. #define HAVE_SYS_SOCKET_H 1
  59. #define HAVE_SYS_TIME_H 1
  60. #define HAVE_SYS_TIMEB_H 1
  61. #define HAVE_SYS_UN_H 1
  62. #define HAVE_NLIST_H 1
  63. #define HAVE_FCNTL_H 1
  64. #define HAVE_LIMITS_H 1
  65. #define HAVE_LOCALE_H 1
  66. #define HAVE_SYS_FILE_H 1
  67. #define HAVE_SYS_IOCTL_H 1
  68. #define HAVE_SYS_SOCKIO_H 1
  69. #define HAVE_SYS_STAT_H 1
  70. #define HAVE_SYS_TIMES_H 1
  71. #define HAVE_SYS_UIO_H 1
  72. #define HAVE_SYS_UTSNAME_H 1
  73. #define HAVE_NETIPX_IPX_H 1
  74. #define HAVE_DLFCN_H 1
  75. #define HAVE_ERR_H 1
  76. #define HAVE_FCNTL_H 1
  77. #define HAVE_FSTAB_H 1
  78. #define HAVE_GRP_H 1
  79. #define HAVE_KVM_H 1
  80. #define HAVE_LIMITS_H 1
  81. #define HAVE_PWD_H 1
  82. #define HAVE_COM_ERR_H 1
  83. #define HAVE_UTMPX_H 1
  84. #define HAVE_SYS_FILE_H 1
  85. #define HAVE_SYS_FILIO_H 1
  86. #define HAVE_SYS_IOCTL_H 1
  87. #define HAVE_SYS_PROTOSW_H 1
  88. #define HAVE_SYS_SOCKIO_H 1
  89. #define HAVE_SYS_STAT_H 1
  90. #define HAVE_SYS_STATVFS_H 1
  91. #define HAVE_SYS_UTSNAME_H 1
  92. #define HAVE_SYS_VMMETER_H 1
  93. #define HAVE_MACHINE_PARAM_H 1
  94. #define HAVE_NETINET_TCP_FSM_H 1
  95. #define HAVE_VM_VM_H 1
  96. #define HAVE_VM_VM_EXTERN_H 1
  97. #define HAVE_VM_VM_PARAM_H 1
  98. #define HAVE_FCNTL_H 1
  99. #define HAVE_GRP_H 1
  100. #define HAVE_PWD_H 1
  101. #define HAVE_SYS_CDEFS_H 1
  102. #define HAVE_SYS_IOCTL_H 1
  103. #define HAVE_SYS_SOCKET_H 1
  104. #define HAVE_SYS_SOCKIO_H 1
  105. #define HAVE_SYS_TIME_H 1
  106. #define HAVE_SEARCH_H 1
  107. #define HAVE_SYS_POLL_H 1
  108. #define HAVE_OPENSSL_AES_H 1
  109. #define HAVE_OPENSSL_DH_H 1
  110. #define HAVE_OPENSSL_DES_H 1
  111. #define HAVE_OPENSSL_HMAC_H 1
  112. #define HAVE_OPENSSL_EVP_H 1
  113. #define HAVE_RPM_RPMTS_H 1
  114. #define HAVE_RPM_RPMFILEUTIL_H 1
  115. #define HAVE_STDLIB_H 1
  116. #define HAVE_NET_IF_DL_H 1
  117. #define HAVE_SYS_SYSCTL_H 1
  118. #define HAVE_OSRELDATE_H 1
  119. #define HAVE_NET_IF_DL_H 1
  120. #define HAVE_NET_IF_TYPES_H 1
  121. #define HAVE_SYS_DKSTAT_H 1
  122. #define HAVE_SYS_CONF_H 1
  123. #define HAVE_SYS_MBUF_H 1
  124. #define HAVE_SYS_MOUNT_H 1
  125. #define HAVE_SYS_PROC_H 1
  126. #define HAVE_SYS_QUEUE_H 1
  127. #define HAVE_SYS_SYSCTL_H 1
  128. #define HAVE_SYS_USER_H 1
  129. #define HAVE_SYS_SEMA_H 1
  130. #define HAVE_SYS_SOCKETVAR_H 1
  131. #define HAVE_SYS_VNODE_H 1
  132. #define HAVE_SYS_DISKLABEL_H 1
  133. #define HAVE_UFS_UFS_DINODE_H 1
  134. #define HAVE_UFS_UFS_QUOTA_H 1
  135. #define HAVE_UFS_UFS_INODE_H 1
  136. #define HAVE_UFS_FFS_FS_H 1
  137. #define HAVE_ARPA_INET_H 1
  138. #define HAVE_NET_IF_H 1
  139. #define HAVE_NETINET_IN_H 1
  140. #define HAVE_NETDB_H 1
  141. #define HAVE_NET_IF_ARP_H 1
  142. #define HAVE_NET_IF_MIB_H 1
  143. #define HAVE_NET_IF_VAR_H 1
  144. #define HAVE_NETINET_IF_ETHER_H 1
  145. #define HAVE_NETINET_IN_SYSTM_H 1
  146. #define HAVE_NETINET_IN_VAR_H 1
  147. #define HAVE_NETINET_IP_H 1
  148. #define HAVE_NETINET_IP_ICMP_H 1
  149. #define HAVE_NETINET_ICMP_VAR_H 1
  150. #define HAVE_NETINET_IP_VAR_H 1
  151. #define HAVE_NETINET_TCP_H 1
  152. #define HAVE_NETINET_TCP_TIMER_H 1
  153. #define HAVE_NETINET_TCP_VAR_H 1
  154. #define HAVE_NETINET_TCPIP_H 1
  155. #define HAVE_NETINET_UDP_H 1
  156. #define HAVE_NETINET_UDP_VAR_H 1
  157. #define HAVE_NET_ROUTE_H 1
  158. #define HAVE_NETINET_ICMP6_H 1
  159. #define HAVE_NETINET_IP6_H 1
  160. #define HAVE_NETINET6_IN6_VAR_H 1
  161. #define HAVE_NETINET6_IN6_PCB_H 1
  162. #define HAVE_NETINET6_IP6_VAR_H 1
  163. #define HAVE_NETINET6_TCP6_VAR_H 1
  164. #define HAVE_NETINET_IN_PCB_H 1
  165. #define HAVE_PKG_H 1
  166. #define HAVE_LIBPKG 1
  167. /* end confdefs.h.  */
  168. #include <stdio.h>
  169. #ifdef HAVE_SYS_TYPES_H
  170. # include <sys/types.h>
  171. #endif
  172. #ifdef HAVE_SYS_STAT_H
  173. # include <sys/stat.h>
  174. #endif
  175. #ifdef STDC_HEADERS
  176. # include <stdlib.h>
  177. # include <stddef.h>
  178. #else
  179. # ifdef HAVE_STDLIB_H
  180. #  include <stdlib.h>
  181. # endif
  182. #endif
  183. #ifdef HAVE_STRING_H
  184. # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
  185. #  include <memory.h>
  186. # endif
  187. # include <string.h>
  188. #endif
  189. #ifdef HAVE_STRINGS_H
  190. # include <strings.h>
  191. #endif
  192. #ifdef HAVE_INTTYPES_H
  193. # include <inttypes.h>
  194. #endif
  195. #ifdef HAVE_STDINT_H
  196. # include <stdint.h>
  197. #endif
  198. #ifdef HAVE_UNISTD_H
  199. # include <unistd.h>
  200. #endif
  201. static long int longval () { return (long int) (sizeof (short)); }
  202. static unsigned long int ulongval () { return (long int) (sizeof (short)); }
  203. #include <stdio.h>
  204. #include <stdlib.h>
  205. int
  206. main ()
  207. {
  208.  
  209.   FILE *f = fopen ("conftest.val", "w");
  210.   if (! f)
  211.     return 1;
  212.   if (((long int) (sizeof (short))) < 0)
  213.     {
  214.       long int i = longval ();
  215.       if (i != ((long int) (sizeof (short))))
  216.       return 1;
  217.       fprintf (f, "%ld", i);
  218.     }
  219.   else
  220.     {
  221.       unsigned long int i = ulongval ();
  222.       if (i != ((long int) (sizeof (short))))
  223.       return 1;
  224.       fprintf (f, "%lu", i);
  225.     }
  226.   /* Do not output a trailing newline, as this causes \r\n confusion
  227.      on some platforms.  */
  228.   return ferror (f) |fclose (f) != 0;
  229.  
  230.   ;
  231.   return 0;
  232. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement