GNUnet  0.10.x
Macros | Functions
platform.h File Reference
#include <netdb.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <pwd.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
#include <grp.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>
#include <stdbool.h>
#include <errno.h>
#include <signal.h>
#include <libgen.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <fcntl.h>
#include <math.h>
#include <time.h>
#include <limits.h>
#include <ctype.h>
#include "plibc.h"
#include "compat.h"
#include <locale.h>
#include "gettext.h"
#include <sys/mman.h>
Include dependency graph for platform.h:

Go to the source code of this file.

Macros

#define HAVE_USED_CONFIG_H
 
#define BREAKPOINT
 
#define GNUNET_SIGCHLD   SIGCHLD
 
#define ALLOW_EXTRA_CHECKS   GNUNET_YES
 These may be expensive, but good for debugging... More...
 
#define _XOPEN_SOURCE   499
 For strptime (glibc2 needs this). More...
 
#define _REENTRANT
 
#define VERBOSE_STATS   0
 
#define _(String)   dgettext("gnunet",String)
 GNU gettext support macro. More...
 
#define LIBEXTRACTOR_GETTEXT_DOMAIN   "libextractor"
 
#define SIZE_MAX   ((size_t)(-1))
 
#define O_LARGEFILE   0
 
#define AI_NUMERICSERV   0
 AI_NUMERICSERV not defined in windows. More...
 
#define MAKE_UNALIGNED(val)   val
 
#define FDTYPE   int
 
#define SOCKTYPE   int
 
#define GNUNET_TERM_SIG   SIGTERM
 The termination signal. More...
 
#define PATH_MAX   4096
 Assumed maximum path length. More...
 
#define GNUNET_THREAD_LOCAL
 

Functions

long long atoll (const char *nptr)
 

Detailed Description

Author
Nils Durner
Christian Grothoff

Plaform specific includes and defines.

This file should never be included by installed header files (those starting with "gnunet_").

Definition in file platform.h.

Macro Definition Documentation

◆ HAVE_USED_CONFIG_H

#define HAVE_USED_CONFIG_H

Definition at line 35 of file platform.h.

◆ BREAKPOINT

#define BREAKPOINT

Definition at line 45 of file platform.h.

◆ GNUNET_SIGCHLD

#define GNUNET_SIGCHLD   SIGCHLD

Definition at line 46 of file platform.h.

Referenced by GNUNET_SIGNAL_handler_install(), and main().

◆ ALLOW_EXTRA_CHECKS

#define ALLOW_EXTRA_CHECKS   GNUNET_YES

These may be expensive, but good for debugging...

Definition at line 56 of file platform.h.

◆ _XOPEN_SOURCE

#define _XOPEN_SOURCE   499

For strptime (glibc2 needs this).

Definition at line 62 of file platform.h.

◆ _REENTRANT

#define _REENTRANT

Definition at line 66 of file platform.h.

◆ VERBOSE_STATS

#define VERBOSE_STATS   0

Definition at line 71 of file platform.h.

◆ _

#define _ (   String)    dgettext("gnunet",String)

GNU gettext support macro.

Definition at line 208 of file platform.h.

Referenced by __attribute__(), accept_client(), access_handler_callback(), action_loop(), add_address_to_hello(), add_continuation(), add_key_to_bloomfilter(), add_revocation(), add_services(), addr_cb(), advertise_dns_exit(), allocate_v4_address(), allocate_v6_address(), allocation_cb(), analyze_send_error(), api_create_hello(), api_send(), arm_req_string(), arm_ret_string(), ats_perf_mon_cb(), audio_write(), auto_config_cb(), blacklist_cfg_iter(), block_plugin_dht_get_key(), broadcast_mst_cb(), calculate_pow(), call_error_handler(), call_event_handler(), callback_download(), caller_event_handler(), check_access(), check_config(), check_get(), check_ssl_certificate(), check_unique(), clean_task(), clean_up(), cleanup(), client_configure_plugin(), client_run(), client_schedule(), client_start(), conn_status(), connect_completion_callback(), connect_notify(), context_state_callback(), continuation_print(), continue_after_remove(), controller_status_cb(), conversation_string_to_value(), conversation_value_to_string(), core_init(), create_finished(), create_hostkeys(), create_keys(), create_listen_socket(), create_loc_uri(), create_macendpoint(), create_response(), create_session(), credential_string_to_value(), cron_clean_data_hosts(), cron_scan_directory_data_hosts(), curl_check_hdr(), database_setup(), database_shutdown(), datacache_get_iterator(), default_ego_cb(), del_continuation(), del_monitor(), delayed_restart_task(), delete_files(), deserialize_download_file(), deserialize_file_information(), deserialize_publish_file(), deserialize_search(), deserialize_search_file(), deserialize_search_result(), deserialize_subdownload(), deserialize_unindex_file(), detach_terminal(), directory_scan_cb(), directory_trim_complete(), discard_expired(), disk_utilization_change_cb(), display_record(), display_records_from_block(), dns_post_request_handler(), dns_result_parser(), dns_string_to_value(), do_accept(), do_address(), do_call(), do_dns_read(), do_get(), do_reconnect(), do_reject(), do_resume(), do_s5r_read(), do_send(), do_shutdown(), do_status(), do_suspend(), do_unknown(), download_hostlist(), download_prepare(), ds_put_cont(), dump_my_hello(), dump_pc(), ego_callback(), enable(), encode_cont(), end(), evaluate(), event_cb(), exit_signal_callback(), expand_dollar(), finish_cache_operation(), finish_request(), finish_reserve(), flush_bulk(), force_reconnect(), format_help(), forward_reply(), free_fragment_message(), free_macendpoint(), full_recursive_download(), GAS_mlp_address_add(), GAS_mlp_address_property_changed(), GAS_plugin_init(), GDS_DATACACHE_handle_put(), gen_topo_from_file(), get_cb(), get_existing_record(), get_my_cnf_path(), get_quota(), get_result_iterator(), get_server_addresses(), get_type(), getopt_set_metadata(), GNS_interceptor_init(), gns_string_to_value(), GNUNET_a2s(), GNUNET_ATS_solvers_load_quotas(), GNUNET_ATS_TEST_logging_start(), GNUNET_ATS_TEST_logging_stop(), GNUNET_BIO_read(), GNUNET_BIO_read_meta_data(), GNUNET_BIO_read_string(), GNUNET_CLIENT_connect(), GNUNET_CONFIGURATION_deserialize(), GNUNET_CONFIGURATION_get_value_choice(), GNUNET_CONFIGURATION_get_value_time(), GNUNET_CONFIGURATION_parse(), GNUNET_CONNECTION_create_from_accept(), GNUNET_CONTAINER_bloomfilter_load(), GNUNET_CREDENTIAL_credential_from_string(), GNUNET_CRYPTO_ecdsa_key_create_from_file(), GNUNET_CRYPTO_ecdsa_sign(), GNUNET_CRYPTO_ecdsa_verify(), GNUNET_CRYPTO_eddsa_key_create_from_file(), GNUNET_CRYPTO_eddsa_sign(), GNUNET_CRYPTO_eddsa_verify(), GNUNET_CRYPTO_get_peer_identity(), GNUNET_CRYPTO_rsa_verify(), GNUNET_DATACACHE_create(), GNUNET_DATASTORE_disconnect(), GNUNET_DEFRAGMENT_process_fragment(), GNUNET_DISK_directory_scan(), GNUNET_DISK_file_change_owner(), GNUNET_DNSPARSER_builder_add_name(), GNUNET_error_type_to_string(), GNUNET_FRAGMENT_context_create(), GNUNET_FRAGMENT_process_ack(), GNUNET_FRIENDS_parse(), GNUNET_FRIENDS_write_start(), GNUNET_FS_add_to_index(), GNUNET_FS_data_reader_file_(), GNUNET_FS_directory_list_contents(), GNUNET_FS_download_start_task_(), GNUNET_FS_get_indexed_files(), GNUNET_FS_handle_on_demand_block(), GNUNET_FS_meta_data_suggest_filename(), GNUNET_FS_publish_ksk(), GNUNET_FS_publish_main_(), GNUNET_FS_publish_sks(), GNUNET_FS_publish_start(), GNUNET_FS_publish_ublock_(), GNUNET_FS_unindex_do_remove_(), GNUNET_FS_unindex_do_remove_kblocks_(), GNUNET_FS_unindex_process_hash_(), GNUNET_FS_uri_ksk_create(), GNUNET_FS_uri_parse(), GNUNET_GNS_lookup_with_tld(), GNUNET_HOSTLIST_client_start(), GNUNET_HOSTLIST_server_start(), GNUNET_log_config_invalid(), GNUNET_log_config_missing(), GNUNET_MY_exec_prepared(), GNUNET_MY_extract_result(), GNUNET_NAT_AUTO_status2string(), GNUNET_NAT_AUTO_test_start(), GNUNET_NAT_mini_get_external_ipv4_(), GNUNET_NAT_mini_map_start(), GNUNET_NAT_test_start(), GNUNET_NETWORK_shorten_unixpath(), GNUNET_NETWORK_socket_select(), GNUNET_OS_check_helper_binary(), GNUNET_PLUGIN_load(), GNUNET_PLUGIN_load_all(), GNUNET_PQ_prepare_statements(), GNUNET_PROGRAM_run2(), gnunet_read(), GNUNET_REGEX_announce(), GNUNET_REGEX_search(), GNUNET_RESOLVER_hostname_get(), GNUNET_RESOLVER_local_fqdn_get(), GNUNET_SERVICE_run_(), GNUNET_SIGNAL_handler_install(), GNUNET_SOCKS_do_connect(), GNUNET_SQ_bind(), GNUNET_SQ_reset(), GNUNET_STRINGS_absolute_time_to_string(), GNUNET_STRINGS_byte_size_fancy(), GNUNET_STRINGS_conv(), GNUNET_STRINGS_filename_expand(), GNUNET_STRINGS_parse_ipv4_policy(), GNUNET_STRINGS_parse_ipv6_policy(), GNUNET_STRINGS_relative_time_to_string(), GNUNET_STRINGS_to_address_ipv6(), GNUNET_TESTBED_hosts_load_from_file(), GNUNET_TESTBED_hosts_load_from_loadleveler(), GNUNET_TESTBED_run(), GNUNET_TESTING_hostkey_get(), GNUNET_TESTING_peer_configure(), GNUNET_TESTING_peer_start(), GNUNET_TESTING_service_run(), GNUNET_TIME_absolute_get_monotonic(), GNUNET_TRANSPORT_TESTING_transport_communicator_service_start(), gnunet_uri(), GPI_plugins_load(), GSF_push_init_(), GST_blacklist_test_allowed(), GST_neighbours_handle_session_syn(), GST_plugins_load(), GST_stats_init(), GST_validation_handle_ping(), handle_add_host_confirm(), handle_autoconfig_request(), handle_backchannel_incoming(), handle_block_cache_response(), handle_client_redirect_to_service(), handle_client_register_message(), handle_delete_message(), handle_dummy(), handle_encrypted(), handle_ephemeral_key(), handle_friend(), handle_gns_namecache_resolution_result(), handle_gns_resolution_result(), handle_helper_message(), handle_index_start_failed(), handle_iterate_end(), handle_iterate_result(), handle_lookup_timeout(), handle_p2p_migration_stop(), handle_record_store_response(), handle_rename_message(), handle_request(), handle_request_connection_reversal(), handle_reserve(), handle_result(), handle_revocation_result(), handle_set_default_message(), handle_stop(), handle_success_response(), handle_watch_record(), hash_for_index_cb(), hash_for_index_val(), helper_read(), helper_write(), host_habitable_cb(), host_processor(), host_registration_completion(), hostkeys_load(), icmp_from_helper(), identity_cb(), identity_continuation(), identity_master_cb(), index_mq_error_handler(), init_callback(), init_cb(), inittransport_smtp(), item_printer(), LEGACY_SERVICE_get_server_addresses(), LEGACY_SERVICE_run(), libgnunet_plugin_ats_mlp_init(), libgnunet_plugin_ats_proportional_init(), libgnunet_plugin_ats_ril_init(), libgnunet_plugin_datacache_heap_init(), libgnunet_plugin_datacache_sqlite_done(), libgnunet_plugin_datastore_heap_init(), libgnunet_plugin_datastore_mysql_init(), libgnunet_plugin_datastore_postgres_init(), libgnunet_plugin_datastore_sqlite_init(), libgnunet_plugin_datastore_template_init(), libgnunet_plugin_namecache_flat_init(), libgnunet_plugin_namecache_sqlite_init(), libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_sqlite_init(), libgnunet_plugin_rest_config_init(), libgnunet_plugin_rest_copying_init(), libgnunet_plugin_rest_credential_init(), libgnunet_plugin_rest_gns_init(), libgnunet_plugin_rest_identity_init(), libgnunet_plugin_rest_namestore_init(), libgnunet_plugin_rest_openid_connect_init(), libgnunet_plugin_rest_peerinfo_init(), libgnunet_plugin_rest_reclaim_init(), libgnunet_plugin_transport_http_client_done(), libgnunet_plugin_transport_http_server_done(), libgnunet_plugin_transport_http_server_init(), LIBGNUNET_PLUGIN_TRANSPORT_INIT(), libgnunet_plugin_transport_tcp_init(), libgnunet_plugin_transport_udp_init(), libgnunet_plugin_transport_unix_init(), list_callback(), listenAndDistribute(), load(), load_cert_from_file(), load_hostlist_file(), load_key_from_file(), load_keys(), load_plugin(), load_quota(), load_state(), loc_mq_error_handler(), lookup_hole_external(), lookup_it_processor(), main(), main_init(), main_task(), maint_child_death(), message_token(), mlp_create_problem(), monitor_cb(), monitor_notify_connect(), monitor_notify_disconnect(), mq_error_handler(), multirecord_process(), mysql_plugin_get_keys(), mysql_plugin_put(), mysql_plugin_remove_key(), namecache_cache_continuation(), nat_server_read(), nibble_to_regex(), notify_connect(), notify_disconnect(), odc_warn_delay_task(), ogg_init(), open_listen_socket(), open_socket(), operation_timeout(), os_get_gnunet_path(), pa_init(), packetizer(), parse_definitions(), parse_ip_options(), parse_name(), parse_port_policy(), parse_quota(), percent_decode_keyword(), phone_error_handler(), phone_event_handler(), plugin_init(), post_iterator(), postgres_plugin_drop(), postgres_plugin_put(), postgres_plugin_remove_key(), print_entry(), print_info(), print_key(), print_my_uri(), print_peer_info(), print_query_result(), print_quotas(), print_revocation_result(), printer(), printer_watch(), process_acl4(), process_acl6(), process_data(), process_ego_file(), process_helper_messages(), process_if(), process_kblock(), process_notify(), process_peer(), process_peer_monitoring_cb(), process_reply(), process_resolved_address(), process_result_with_request(), process_sblock(), process_stat_done(), progress_cb(), publish_inspector(), put_cb(), put_continuation(), read_friends_file(), read_host_file(), read_index_list(), read_service_conf(), read_update_information_graph(), reconnect_later(), recursive_gns2dns_resolution(), remove_cont(), remove_continuation(), remove_garbage(), replace_cont(), reply_to_dns(), req_string(), resolve_function(), resolver_lookup_get_next_label(), restart_nat_server(), result_callback(), ret_string(), reversal_test(), route_packet(), rsa_sign_mpi(), run(), run_mhd_start_daemon(), run_with_zone_pkey(), save(), save_hostlist_file(), save_state(), select_read_cb(), send_ack(), send_hello_beacon(), send_response(), send_session_syn_ack_cont(), send_session_syn_cont(), send_syn(), send_syn_ack_message(), server_accept_cb(), server_access_cb(), server_check_ipv6_support(), server_configure_plugin(), server_get_addresses(), server_log(), server_start(), server_start_report_addresses(), service_task(), set_absolute_time(), set_base32(), set_done(), set_external_ipv4(), set_json(), set_relative_time(), set_uint(), set_uint16(), set_ulong(), set_user_id(), setup_broadcast(), setup_data_transfer(), setup_exit_helper_args(), setup_service(), setup_sockets(), show_peer(), shutdown_task(), sql_exec(), sql_prepare(), sqlite_plugin_estimate_size(), sqlite_plugin_put(), srv_status(), start_callback(), start_dump(), start_insert(), start_phone(), start_process(), state_machine(), stdin_cb(), stop_callback(), store_service(), stream_read_callback(), stream_state_callback(), switch_to_speaker(), task_check(), task_download(), tcp_from_helper(), tcp_plugin_address_pretty_printer(), term_callback(), terminate_task(), test_icmp_client(), test_icmp_server(), test_nat_punched(), test_service_configuration(), test_upnpc(), timeout_task(), transmit_fragment(), transmit_next(), transmit_query(), transport_addr_to_str_cb(), trigger_recursive_download(), try_match_block(), try_unixpath(), udp_from_helper(), unindex_directory_scan_cb(), unindex_finish(), unindex_mq_error_handler(), unindex_reader(), unix_transport_server_start(), uri_chk_parse(), uri_ksk_parse(), uri_loc_parse(), uri_sks_parse(), vpn_allocation_cb(), warn_delay_task(), warn_no_client_continue(), warn_no_receive_done(), wlan_data_message_handler(), wlan_plugin_disconnect_session(), work(), write_index_list(), write_update_information_graph(), zone_to_name_cb(), and zone_to_name_error().

◆ LIBEXTRACTOR_GETTEXT_DOMAIN

#define LIBEXTRACTOR_GETTEXT_DOMAIN   "libextractor"

Definition at line 209 of file platform.h.

Referenced by getopt_set_metadata(), and item_printer().

◆ SIZE_MAX

#define SIZE_MAX   ((size_t)(-1))

◆ O_LARGEFILE

#define O_LARGEFILE   0

Definition at line 254 of file platform.h.

Referenced by GNUNET_DISK_file_open().

◆ AI_NUMERICSERV

#define AI_NUMERICSERV   0

AI_NUMERICSERV not defined in windows.

Then we just do without.

Definition at line 261 of file platform.h.

Referenced by GNUNET_NETWORK_test_port_free(), GNUNET_TESTING_reserve_port(), and simple_resolve().

◆ MAKE_UNALIGNED

#define MAKE_UNALIGNED (   val)    val

Definition at line 268 of file platform.h.

◆ FDTYPE

#define FDTYPE   int

Definition at line 275 of file platform.h.

◆ SOCKTYPE

#define SOCKTYPE   int

Definition at line 276 of file platform.h.

Referenced by start_process().

◆ GNUNET_TERM_SIG

#define GNUNET_TERM_SIG   SIGTERM

◆ PATH_MAX

#define PATH_MAX   4096

Assumed maximum path length.

Definition at line 289 of file platform.h.

Referenced by update_config().

◆ GNUNET_THREAD_LOCAL

#define GNUNET_THREAD_LOCAL

Definition at line 295 of file platform.h.

Referenced by GNUNET_h2s(), GNUNET_i2s(), GNUNET_i2s2(), GNUNET_i2s_full(), and output_message().

Function Documentation

◆ atoll()

long long atoll ( const char *  nptr)

Definition at line 335 of file winproc.c.

Referenced by main().

336 {
337  return atol (nptr);
338 }
Here is the caller graph for this function: