ObjFW  Check-in [d0b636d965]

Overview
Comment:macros.h: Fix missing ) and #include
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d0b636d9651d3fcfd074204fe21d5fa0e844edf3a5f722e5325fef72bf586ef8
User & Date: js on 2018-07-28 17:46:26
Other Links: manifest | tags
Context
2018-07-28
18:29
Add of_socket_address_parse_ip() check-in: 2a1546da86 user: js tags: trunk
17:46
macros.h: Fix missing ) and #include check-in: d0b636d965 user: js tags: trunk
17:38
Rename of_{udp_ -> }socket_address check-in: b16f2b9e25 user: js tags: trunk
Changes

Modified src/OFObject.m from [c2001431e3] to [da61972c93].

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <assert.h>

#include <sys/time.h>

#ifdef OF_APPLE_RUNTIME
# include <dlfcn.h>
#endif

#import "OFObject.h"
#import "OFArray.h"
#import "OFLocalization.h"







<
<







19
20
21
22
23
24
25


26
27
28
29
30
31
32

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <assert.h>



#ifdef OF_APPLE_RUNTIME
# include <dlfcn.h>
#endif

#import "OFObject.h"
#import "OFArray.h"
#import "OFLocalization.h"

Modified src/macros.h from [3f9a87cf9e] to [cec5f5d20d].

27
28
29
30
31
32
33


34
35
36
37
38
39
40
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>



#include "platform.h"

#ifdef OF_OBJFW_RUNTIME
# ifdef OF_COMPILING_OBJFW
#  import "ObjFW_RT.h"
# else
#  import <ObjFW_RT/ObjFW_RT.h>







>
>







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <sys/time.h>

#include "platform.h"

#ifdef OF_OBJFW_RUNTIME
# ifdef OF_COMPILING_OBJFW
#  import "ObjFW_RT.h"
# else
#  import <ObjFW_RT/ObjFW_RT.h>
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
#if defined(OF_HAVE_ARC4RANDOM)
	return arc4random();
#elif defined(OF_HAVE_RANDOM)
	struct timeval tv;

	gettimeofday(&tv, NULL);
	srandom((unsigned)(tv.tv_sec ^ tv.tv_usec));
	return (((uint32_t)(random()) << 16) | ((uint32_t)(random()) & 0xFFFF);
#else
	struct timeval tv;

	gettimeofday(&tv, NULL);
	srand((unsigned)(t.tv_sec ^ t.tv_usec));
	return (((uint32_t)(rand()) << 16) | ((uint32_t)(rand()) & 0xFFFF);
#endif
}







|





|


857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
#if defined(OF_HAVE_ARC4RANDOM)
	return arc4random();
#elif defined(OF_HAVE_RANDOM)
	struct timeval tv;

	gettimeofday(&tv, NULL);
	srandom((unsigned)(tv.tv_sec ^ tv.tv_usec));
	return (((uint32_t)(random()) << 16) | ((uint32_t)(random()) & 0xFFFF));
#else
	struct timeval tv;

	gettimeofday(&tv, NULL);
	srand((unsigned)(t.tv_sec ^ t.tv_usec));
	return (((uint32_t)(rand()) << 16) | ((uint32_t)(rand()) & 0xFFFF));
#endif
}