Random function working on Linux not on Mac












0














I'm currently learning network programming in university and programmed a server. As we need this one for further progress I need to reuse the code every time. There is a random function with an error I don't really get because on the linux pcs at university everything compiles well only my mac which I do all my homework shows this error.






#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/wait.h>
#include <signal.h>
#include <time.h>
//#define PORT "3490" // the port users will be connecting to
#define BACKLOG 10 // how many pending connections queue will hold


int random(int min, int max){
srand ( time(NULL) );
return min + rand() / (RAND_MAX / (max - min + 1) + 1);
}


void sigchld_handler(int s)
{
// waitpid() might overwrite errno, so we save and restore it:
int saved_errno = errno;
while(waitpid(-1, NULL, WNOHANG) > 0);
errno = saved_errno;
}
// get sockaddr, IPv4 or IPv6:
void *get_in_addr(struct sockaddr *sa)
{
if (sa->sa_family == AF_INET) {
return &(((struct sockaddr_in*)sa)->sin_addr);
}
return &(((struct sockaddr_in6*)sa)->sin6_addr);
}
int main(int argc, char *argv)
{
int sockfd, new_fd; // listen on sock_fd, new connection on new_fd
struct addrinfo hints, *servinfo, *p;
struct sockaddr_storage their_addr; // connector's address information
socklen_t sin_size;
struct sigaction sa;
int yes=1;
char s[INET6_ADDRSTRLEN];
int rv;
//int linetoread;

if (argc != 3) {
fprintf(stderr,"usage: server port txtfilen");
exit(1);
}

FILE* fp;
char buffer[255];
int i = 0;
char rnd[200][255];
int fixed;

fp = fopen(argv[2], "r");

while(fgets(buffer, 255, (FILE*) fp)) {
//printf("%sn", buffer);
for (int j = 0; j < 255; j++){
rnd[i][j] = buffer[j];
}
i++;
}

fclose(fp);
//printf("number of lines: %dn", i);
//linetoread = rand() % i;
//printf("%dn", random(0,i));

memset(&hints, 0, sizeof hints);
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE; // use my IP
if ((rv = getaddrinfo(NULL, argv[1], &hints, &servinfo)) != 0) {
fprintf(stderr, "getaddrinfo: %sn", gai_strerror(rv));
return 1;
}
// loop through all the results and bind to the first we can
for(p = servinfo; p != NULL; p = p->ai_next) {
if ((sockfd = socket(p->ai_family, p->ai_socktype,
p->ai_protocol)) == -1) {
perror("server: socket");
continue;
}
if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes,
sizeof(int)) == -1) {
perror("setsockopt");
exit(1);
}
if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) {
close(sockfd);
perror("server: bind");
continue;
}
break;
}
freeaddrinfo(servinfo); // all done with this structure
if (p == NULL) {
fprintf(stderr, "server: failed to bindn");
exit(1);
}
if (listen(sockfd, BACKLOG) == -1) {
perror("listen");
exit(1);
}
sa.sa_handler = sigchld_handler; // reap all dead processes
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART;
if (sigaction(SIGCHLD, &sa, NULL) == -1) {
perror("sigaction");
exit(1);
}
printf("server: waiting for connections...n");
while(1) { // main accept() loop
sin_size = sizeof their_addr;
new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size);
if (new_fd == -1) {
perror("accept");
continue;
}
inet_ntop(their_addr.ss_family,
get_in_addr((struct sockaddr *)&their_addr),
s, sizeof s);
printf("server: got connection from %sn", s);
if (!fork()) { // this is the child process
close(sockfd); // child doesn't need the listener
fixed = random(0,i-1);
//printf("line: %dn", fixed);
if (send(new_fd, rnd[fixed], strlen(rnd[fixed]), 0) == -1)
perror("send");
close(new_fd);
exit(0);
}
close(new_fd); // parent doesn't need this
}
return 0;
}




Error on my mac:






server.c:16:5: error: conflicting types for 'random'
int random(int min, int max){
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdlib.h:233:7: note:
previous declaration is here
long random(void) __swift_unavailable("Use arc4random instead.");
^
server.c:132:19: error: too many arguments to function call, expected 0, have 2
fixed = random(0,i-1);
~~~~~~ ^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdlib.h:233:1: note:
'random' declared here
long random(void) __swift_unavailable("Use arc4random instead.");
^
2 errors generated.











share|improve this question



























    0














    I'm currently learning network programming in university and programmed a server. As we need this one for further progress I need to reuse the code every time. There is a random function with an error I don't really get because on the linux pcs at university everything compiles well only my mac which I do all my homework shows this error.






    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <errno.h>
    #include <string.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <netinet/in.h>
    #include <netdb.h>
    #include <arpa/inet.h>
    #include <sys/wait.h>
    #include <signal.h>
    #include <time.h>
    //#define PORT "3490" // the port users will be connecting to
    #define BACKLOG 10 // how many pending connections queue will hold


    int random(int min, int max){
    srand ( time(NULL) );
    return min + rand() / (RAND_MAX / (max - min + 1) + 1);
    }


    void sigchld_handler(int s)
    {
    // waitpid() might overwrite errno, so we save and restore it:
    int saved_errno = errno;
    while(waitpid(-1, NULL, WNOHANG) > 0);
    errno = saved_errno;
    }
    // get sockaddr, IPv4 or IPv6:
    void *get_in_addr(struct sockaddr *sa)
    {
    if (sa->sa_family == AF_INET) {
    return &(((struct sockaddr_in*)sa)->sin_addr);
    }
    return &(((struct sockaddr_in6*)sa)->sin6_addr);
    }
    int main(int argc, char *argv)
    {
    int sockfd, new_fd; // listen on sock_fd, new connection on new_fd
    struct addrinfo hints, *servinfo, *p;
    struct sockaddr_storage their_addr; // connector's address information
    socklen_t sin_size;
    struct sigaction sa;
    int yes=1;
    char s[INET6_ADDRSTRLEN];
    int rv;
    //int linetoread;

    if (argc != 3) {
    fprintf(stderr,"usage: server port txtfilen");
    exit(1);
    }

    FILE* fp;
    char buffer[255];
    int i = 0;
    char rnd[200][255];
    int fixed;

    fp = fopen(argv[2], "r");

    while(fgets(buffer, 255, (FILE*) fp)) {
    //printf("%sn", buffer);
    for (int j = 0; j < 255; j++){
    rnd[i][j] = buffer[j];
    }
    i++;
    }

    fclose(fp);
    //printf("number of lines: %dn", i);
    //linetoread = rand() % i;
    //printf("%dn", random(0,i));

    memset(&hints, 0, sizeof hints);
    hints.ai_family = AF_UNSPEC;
    hints.ai_socktype = SOCK_STREAM;
    hints.ai_flags = AI_PASSIVE; // use my IP
    if ((rv = getaddrinfo(NULL, argv[1], &hints, &servinfo)) != 0) {
    fprintf(stderr, "getaddrinfo: %sn", gai_strerror(rv));
    return 1;
    }
    // loop through all the results and bind to the first we can
    for(p = servinfo; p != NULL; p = p->ai_next) {
    if ((sockfd = socket(p->ai_family, p->ai_socktype,
    p->ai_protocol)) == -1) {
    perror("server: socket");
    continue;
    }
    if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes,
    sizeof(int)) == -1) {
    perror("setsockopt");
    exit(1);
    }
    if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) {
    close(sockfd);
    perror("server: bind");
    continue;
    }
    break;
    }
    freeaddrinfo(servinfo); // all done with this structure
    if (p == NULL) {
    fprintf(stderr, "server: failed to bindn");
    exit(1);
    }
    if (listen(sockfd, BACKLOG) == -1) {
    perror("listen");
    exit(1);
    }
    sa.sa_handler = sigchld_handler; // reap all dead processes
    sigemptyset(&sa.sa_mask);
    sa.sa_flags = SA_RESTART;
    if (sigaction(SIGCHLD, &sa, NULL) == -1) {
    perror("sigaction");
    exit(1);
    }
    printf("server: waiting for connections...n");
    while(1) { // main accept() loop
    sin_size = sizeof their_addr;
    new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size);
    if (new_fd == -1) {
    perror("accept");
    continue;
    }
    inet_ntop(their_addr.ss_family,
    get_in_addr((struct sockaddr *)&their_addr),
    s, sizeof s);
    printf("server: got connection from %sn", s);
    if (!fork()) { // this is the child process
    close(sockfd); // child doesn't need the listener
    fixed = random(0,i-1);
    //printf("line: %dn", fixed);
    if (send(new_fd, rnd[fixed], strlen(rnd[fixed]), 0) == -1)
    perror("send");
    close(new_fd);
    exit(0);
    }
    close(new_fd); // parent doesn't need this
    }
    return 0;
    }




    Error on my mac:






    server.c:16:5: error: conflicting types for 'random'
    int random(int min, int max){
    ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdlib.h:233:7: note:
    previous declaration is here
    long random(void) __swift_unavailable("Use arc4random instead.");
    ^
    server.c:132:19: error: too many arguments to function call, expected 0, have 2
    fixed = random(0,i-1);
    ~~~~~~ ^~~~~
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdlib.h:233:1: note:
    'random' declared here
    long random(void) __swift_unavailable("Use arc4random instead.");
    ^
    2 errors generated.











    share|improve this question

























      0












      0








      0







      I'm currently learning network programming in university and programmed a server. As we need this one for further progress I need to reuse the code every time. There is a random function with an error I don't really get because on the linux pcs at university everything compiles well only my mac which I do all my homework shows this error.






      #include <stdio.h>
      #include <stdlib.h>
      #include <unistd.h>
      #include <errno.h>
      #include <string.h>
      #include <sys/types.h>
      #include <sys/socket.h>
      #include <netinet/in.h>
      #include <netdb.h>
      #include <arpa/inet.h>
      #include <sys/wait.h>
      #include <signal.h>
      #include <time.h>
      //#define PORT "3490" // the port users will be connecting to
      #define BACKLOG 10 // how many pending connections queue will hold


      int random(int min, int max){
      srand ( time(NULL) );
      return min + rand() / (RAND_MAX / (max - min + 1) + 1);
      }


      void sigchld_handler(int s)
      {
      // waitpid() might overwrite errno, so we save and restore it:
      int saved_errno = errno;
      while(waitpid(-1, NULL, WNOHANG) > 0);
      errno = saved_errno;
      }
      // get sockaddr, IPv4 or IPv6:
      void *get_in_addr(struct sockaddr *sa)
      {
      if (sa->sa_family == AF_INET) {
      return &(((struct sockaddr_in*)sa)->sin_addr);
      }
      return &(((struct sockaddr_in6*)sa)->sin6_addr);
      }
      int main(int argc, char *argv)
      {
      int sockfd, new_fd; // listen on sock_fd, new connection on new_fd
      struct addrinfo hints, *servinfo, *p;
      struct sockaddr_storage their_addr; // connector's address information
      socklen_t sin_size;
      struct sigaction sa;
      int yes=1;
      char s[INET6_ADDRSTRLEN];
      int rv;
      //int linetoread;

      if (argc != 3) {
      fprintf(stderr,"usage: server port txtfilen");
      exit(1);
      }

      FILE* fp;
      char buffer[255];
      int i = 0;
      char rnd[200][255];
      int fixed;

      fp = fopen(argv[2], "r");

      while(fgets(buffer, 255, (FILE*) fp)) {
      //printf("%sn", buffer);
      for (int j = 0; j < 255; j++){
      rnd[i][j] = buffer[j];
      }
      i++;
      }

      fclose(fp);
      //printf("number of lines: %dn", i);
      //linetoread = rand() % i;
      //printf("%dn", random(0,i));

      memset(&hints, 0, sizeof hints);
      hints.ai_family = AF_UNSPEC;
      hints.ai_socktype = SOCK_STREAM;
      hints.ai_flags = AI_PASSIVE; // use my IP
      if ((rv = getaddrinfo(NULL, argv[1], &hints, &servinfo)) != 0) {
      fprintf(stderr, "getaddrinfo: %sn", gai_strerror(rv));
      return 1;
      }
      // loop through all the results and bind to the first we can
      for(p = servinfo; p != NULL; p = p->ai_next) {
      if ((sockfd = socket(p->ai_family, p->ai_socktype,
      p->ai_protocol)) == -1) {
      perror("server: socket");
      continue;
      }
      if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes,
      sizeof(int)) == -1) {
      perror("setsockopt");
      exit(1);
      }
      if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) {
      close(sockfd);
      perror("server: bind");
      continue;
      }
      break;
      }
      freeaddrinfo(servinfo); // all done with this structure
      if (p == NULL) {
      fprintf(stderr, "server: failed to bindn");
      exit(1);
      }
      if (listen(sockfd, BACKLOG) == -1) {
      perror("listen");
      exit(1);
      }
      sa.sa_handler = sigchld_handler; // reap all dead processes
      sigemptyset(&sa.sa_mask);
      sa.sa_flags = SA_RESTART;
      if (sigaction(SIGCHLD, &sa, NULL) == -1) {
      perror("sigaction");
      exit(1);
      }
      printf("server: waiting for connections...n");
      while(1) { // main accept() loop
      sin_size = sizeof their_addr;
      new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size);
      if (new_fd == -1) {
      perror("accept");
      continue;
      }
      inet_ntop(their_addr.ss_family,
      get_in_addr((struct sockaddr *)&their_addr),
      s, sizeof s);
      printf("server: got connection from %sn", s);
      if (!fork()) { // this is the child process
      close(sockfd); // child doesn't need the listener
      fixed = random(0,i-1);
      //printf("line: %dn", fixed);
      if (send(new_fd, rnd[fixed], strlen(rnd[fixed]), 0) == -1)
      perror("send");
      close(new_fd);
      exit(0);
      }
      close(new_fd); // parent doesn't need this
      }
      return 0;
      }




      Error on my mac:






      server.c:16:5: error: conflicting types for 'random'
      int random(int min, int max){
      ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdlib.h:233:7: note:
      previous declaration is here
      long random(void) __swift_unavailable("Use arc4random instead.");
      ^
      server.c:132:19: error: too many arguments to function call, expected 0, have 2
      fixed = random(0,i-1);
      ~~~~~~ ^~~~~
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdlib.h:233:1: note:
      'random' declared here
      long random(void) __swift_unavailable("Use arc4random instead.");
      ^
      2 errors generated.











      share|improve this question













      I'm currently learning network programming in university and programmed a server. As we need this one for further progress I need to reuse the code every time. There is a random function with an error I don't really get because on the linux pcs at university everything compiles well only my mac which I do all my homework shows this error.






      #include <stdio.h>
      #include <stdlib.h>
      #include <unistd.h>
      #include <errno.h>
      #include <string.h>
      #include <sys/types.h>
      #include <sys/socket.h>
      #include <netinet/in.h>
      #include <netdb.h>
      #include <arpa/inet.h>
      #include <sys/wait.h>
      #include <signal.h>
      #include <time.h>
      //#define PORT "3490" // the port users will be connecting to
      #define BACKLOG 10 // how many pending connections queue will hold


      int random(int min, int max){
      srand ( time(NULL) );
      return min + rand() / (RAND_MAX / (max - min + 1) + 1);
      }


      void sigchld_handler(int s)
      {
      // waitpid() might overwrite errno, so we save and restore it:
      int saved_errno = errno;
      while(waitpid(-1, NULL, WNOHANG) > 0);
      errno = saved_errno;
      }
      // get sockaddr, IPv4 or IPv6:
      void *get_in_addr(struct sockaddr *sa)
      {
      if (sa->sa_family == AF_INET) {
      return &(((struct sockaddr_in*)sa)->sin_addr);
      }
      return &(((struct sockaddr_in6*)sa)->sin6_addr);
      }
      int main(int argc, char *argv)
      {
      int sockfd, new_fd; // listen on sock_fd, new connection on new_fd
      struct addrinfo hints, *servinfo, *p;
      struct sockaddr_storage their_addr; // connector's address information
      socklen_t sin_size;
      struct sigaction sa;
      int yes=1;
      char s[INET6_ADDRSTRLEN];
      int rv;
      //int linetoread;

      if (argc != 3) {
      fprintf(stderr,"usage: server port txtfilen");
      exit(1);
      }

      FILE* fp;
      char buffer[255];
      int i = 0;
      char rnd[200][255];
      int fixed;

      fp = fopen(argv[2], "r");

      while(fgets(buffer, 255, (FILE*) fp)) {
      //printf("%sn", buffer);
      for (int j = 0; j < 255; j++){
      rnd[i][j] = buffer[j];
      }
      i++;
      }

      fclose(fp);
      //printf("number of lines: %dn", i);
      //linetoread = rand() % i;
      //printf("%dn", random(0,i));

      memset(&hints, 0, sizeof hints);
      hints.ai_family = AF_UNSPEC;
      hints.ai_socktype = SOCK_STREAM;
      hints.ai_flags = AI_PASSIVE; // use my IP
      if ((rv = getaddrinfo(NULL, argv[1], &hints, &servinfo)) != 0) {
      fprintf(stderr, "getaddrinfo: %sn", gai_strerror(rv));
      return 1;
      }
      // loop through all the results and bind to the first we can
      for(p = servinfo; p != NULL; p = p->ai_next) {
      if ((sockfd = socket(p->ai_family, p->ai_socktype,
      p->ai_protocol)) == -1) {
      perror("server: socket");
      continue;
      }
      if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &yes,
      sizeof(int)) == -1) {
      perror("setsockopt");
      exit(1);
      }
      if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) {
      close(sockfd);
      perror("server: bind");
      continue;
      }
      break;
      }
      freeaddrinfo(servinfo); // all done with this structure
      if (p == NULL) {
      fprintf(stderr, "server: failed to bindn");
      exit(1);
      }
      if (listen(sockfd, BACKLOG) == -1) {
      perror("listen");
      exit(1);
      }
      sa.sa_handler = sigchld_handler; // reap all dead processes
      sigemptyset(&sa.sa_mask);
      sa.sa_flags = SA_RESTART;
      if (sigaction(SIGCHLD, &sa, NULL) == -1) {
      perror("sigaction");
      exit(1);
      }
      printf("server: waiting for connections...n");
      while(1) { // main accept() loop
      sin_size = sizeof their_addr;
      new_fd = accept(sockfd, (struct sockaddr *)&their_addr, &sin_size);
      if (new_fd == -1) {
      perror("accept");
      continue;
      }
      inet_ntop(their_addr.ss_family,
      get_in_addr((struct sockaddr *)&their_addr),
      s, sizeof s);
      printf("server: got connection from %sn", s);
      if (!fork()) { // this is the child process
      close(sockfd); // child doesn't need the listener
      fixed = random(0,i-1);
      //printf("line: %dn", fixed);
      if (send(new_fd, rnd[fixed], strlen(rnd[fixed]), 0) == -1)
      perror("send");
      close(new_fd);
      exit(0);
      }
      close(new_fd); // parent doesn't need this
      }
      return 0;
      }




      Error on my mac:






      server.c:16:5: error: conflicting types for 'random'
      int random(int min, int max){
      ^
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdlib.h:233:7: note:
      previous declaration is here
      long random(void) __swift_unavailable("Use arc4random instead.");
      ^
      server.c:132:19: error: too many arguments to function call, expected 0, have 2
      fixed = random(0,i-1);
      ~~~~~~ ^~~~~
      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/stdlib.h:233:1: note:
      'random' declared here
      long random(void) __swift_unavailable("Use arc4random instead.");
      ^
      2 errors generated.








      c random






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 12 '18 at 17:13









      richie4k2k

      1




      1
























          1 Answer
          1






          active

          oldest

          votes


















          0














          random() is a known function name. change it to something else and it will work.






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53267008%2frandom-function-working-on-linux-not-on-mac%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            random() is a known function name. change it to something else and it will work.






            share|improve this answer


























              0














              random() is a known function name. change it to something else and it will work.






              share|improve this answer
























                0












                0








                0






                random() is a known function name. change it to something else and it will work.






                share|improve this answer












                random() is a known function name. change it to something else and it will work.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 12 '18 at 17:18









                lostbard

                3,0631311




                3,0631311






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53267008%2frandom-function-working-on-linux-not-on-mac%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Florida Star v. B. J. F.

                    Danny Elfman

                    Lugert, Oklahoma