Skip to content

Commit c2cec7a

Browse files
authored
remove dead code since #42586 [NFC] (#44782)
1 parent ff0e25c commit c2cec7a

File tree

6 files changed

+2
-277
lines changed

6 files changed

+2
-277
lines changed

src/flisp/flisp.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#include <locale.h>
4242
#include <limits.h>
4343
#include <errno.h>
44+
#include <libgen.h> // defines dirname
4445

4546
#include "platform.h"
4647
#include "libsupport.h"
@@ -51,13 +52,6 @@
5152
extern "C" {
5253
#endif
5354

54-
#if defined(_OS_WINDOWS_) && !defined(_COMPILER_GCC_)
55-
#include <malloc.h>
56-
JL_DLLEXPORT char * dirname(char *);
57-
#else
58-
#include <libgen.h>
59-
#endif
60-
6155
static const char *const builtin_names[] =
6256
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
6357
NULL, NULL, NULL, NULL,

src/init.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#include <string.h>
1111
#include <stdio.h>
1212
#include <fcntl.h>
13-
1413
#include <errno.h>
14+
#include <libgen.h> // defines dirname
1515

1616
#if !defined(_OS_WINDOWS_) || defined(_COMPILER_GCC_)
1717
#include <getopt.h>
@@ -34,8 +34,6 @@
3434
extern "C" {
3535
#endif
3636

37-
#include <libgen.h>
38-
3937
#ifdef _OS_WINDOWS_
4038
extern int needsSymRefreshModuleList;
4139
extern BOOL (WINAPI *hSymRefreshModuleList)(HANDLE);

src/jlapi.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@ extern "C" {
2222
#include <fenv.h>
2323
#endif
2424

25-
#if defined(_OS_WINDOWS_) && !defined(_COMPILER_GCC_)
26-
JL_DLLEXPORT char * __cdecl dirname(char *);
27-
#else
28-
#include <libgen.h>
29-
#endif
30-
#ifndef _OS_WINDOWS_
31-
#include <dlfcn.h>
32-
#endif
33-
3425
JL_DLLEXPORT int jl_is_initialized(void)
3526
{
3627
return jl_main_module != NULL;

src/julia.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,10 @@
5656
# define JL_NORETURN __attribute__ ((noreturn))
5757
# define JL_CONST_FUNC __attribute__((const))
5858
# define JL_USED_FUNC __attribute__((used))
59-
# define JL_SECTION(name) __attribute__((section(name)))
60-
# define JL_THREAD_LOCAL __thread
6159
#else
6260
# define JL_NORETURN
6361
# define JL_CONST_FUNC
6462
# define JL_USED_FUNC
65-
# define JL_THREAD_LOCAL
6663
#endif
6764

6865
#define container_of(ptr, type, member) \

src/support/dirname.c

Lines changed: 0 additions & 249 deletions
This file was deleted.

src/sys.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@
5858
extern "C" {
5959
#endif
6060

61-
#if defined(_OS_WINDOWS_) && !defined(_COMPILER_GCC_)
62-
JL_DLLEXPORT char *dirname(char *);
63-
#else
64-
#include <libgen.h>
65-
#endif
66-
6761
JL_DLLEXPORT int jl_sizeof_off_t(void) { return sizeof(off_t); }
6862
#ifndef _OS_WINDOWS_
6963
JL_DLLEXPORT int jl_sizeof_mode_t(void) { return sizeof(mode_t); }

0 commit comments

Comments
 (0)